Cloudscape Design System
  • Get started
  • Foundation
  • Components
  • Patterns
  • Demos
  • Gen AI
  • GitHub 
Cloudscape Design System
  • Get started
  • Foundation
  • Components
  • Patterns
  • Demos
  • Gen AI
  • GitHub 
  • About

Gen AI

  • AI tools
    1
  • LLMs.txt files

  • Foundation
    3
  • Visual affordance
  • Colors
  • Iconography

  • Patterns
    15
  • Pattern abstraction
  • Generative AI chat
  • Ingress
  • Generative AI output label
  • Generative AI loading states
  • Progressive steps
  • Follow-up questions
  • User authorized actions
  • Variables
  • Shortcut menus
  • Response regeneration
  • Artifact previews
  • Conversational history
  • Support prompts
  • Thinking

  • Components
    6
  1. Cloudscape Design System
    • Gen AI: Patterns
    • Artifact previews
    1. Cloudscape Design System
    2. Gen AI: Patterns
    3. Artifact previews

    Artifact previews

    How to display AI-generated artifacts in generative AI chat.

    On this page

    1. Key UX concepts
    2. Criteria
    3. Inline previews
    4. Canvas previews
    5. General guidelines
    6. Writing guidelines
    7. Accessibility guidelines

    About this page

    Published: December 18, 2025

    Did this page help you?

    Your feedback helps us improve our documentation.
    Provide additional feedback

    Key UX concepts

    Artifacts generated by AI

    Artifacts are AI-generated outputs such as documents, images, code, workflows. These artifacts are rendered as previews that typically contain a label and description, with metadata and related actions.

    Types of artifact previews

    You can display generated artifacts in two ways within the chat experience, each serving different user needs and interaction models:

    • Inline previews: These previews emphasize quick understanding and enable contextual interactions such as download or copy within the chat interface.

    • Canvas previews: These previews display in the chat and expand to show the full artifact in an adjacent area where users can view and interact with the content.

    Criteria

    Inline previews

    Canvas previews

    Artifact complexity

    Simple, self-contained content. For example, a .csv generated by AI that can be downloaded.

    Complex, interactive content that a user can modulate. For example, canvases generated by AI containing forms or wizards.

    Content length

    Short. For example, a code snippet for a CLI command.

    Long. For example, a dense document written by AI.

    Primary user intent

    Quick recognition and basic actions.

    Detailed review, editing, or interaction.

    Key actions

    Quick actions. For example, download, copy, share.

    Complex actions. For example, edit, annotate, or completing a task or workflow.

    Interaction depth

    Minimal. Users can act on the artifact without opening it.

    Complex. Users need to explore or work within the content.

    Conversation flow

    Maintaining flow of the conversation is critical.

    Artifact becomes the primary focus.

    Inline previews

    Code snippets

    Short blocks displayed directly in the conversation using item card with syntax highlighting, language indicator, and copy action. Ideal for quick reference, examples, or snippets users can immediately copy and paste.

    Generative AI assistant

    JD
    Show me the simplest Lambda function to log S3 uploads
    Here is a snippet of the simplest Lambda function to log S3 uploads.
    Python
    def lambda_handler(event, context):
    bucket = event['Records'][0]['s3']['bucket']['name']
    key = event['Records'][0]['s3']['object']['key']
    print(f"New file uploaded: {key} in bucket {bucket}")
    return {'statusCode': 200}
    Use of this service is subject to the AWS Responsible AI Policy 

    Media

    Generated media such as images, charts, diagrams, or videos display with inline previews using item card. These cab include file names, metadata, and actions for downloading or expanding. This allows users to immediately view and assess visual content without requiring them to be opened in a separate viewer. For expanding a generated artifact such as an image, follow the guidance for image magnifier.

    Generative AI assistant

    JD
    Create an image of a happy corgi dog.
    Here you go – an image of a happy corgi dog.
    dog-portrait.jpg
    886 × 408 – 487 KB
    A portrait of a happy corgi dog
    Use of this service is subject to the AWS Responsible AI Policy 

    Download-only files

    Documents and generated files display as downloadable artifacts using item card with file names, size metadata, and download actions. This format works for well any files that users need to save locally without opening or viewing them first.

    Generative AI assistant

    JD
    Please create a .csv of my monthly budget with categories and expenses
    Here is a .csv with your monthly budget and expenses. Let me know if you need any changes to the format or categories.
    jd-budget.csv
    1.82 MB
    Use of this service is subject to the AWS Responsible AI Policy 

    Canvas previews

    Selectable preview

    Artifact previews allow users to interact with generated content and progressively render the full artifact in an adjacent panel using an action card. For example, when a user selects an AI-generated document artifact preview, its contents display in the side panel. Use when users need to preview or read through content as the primary action without requiring secondary actions such as download or share.

    Generative AI assistant

    JD
    Write an architecture overview for our multi-region deployment strategy
    I've drafted an architecture overview covering multi-region topology, data replication, failover strategy, and observability for your deployment.
    18.7 KB
    Use of this service is subject to the AWS Responsible AI Policy 

    multi-region-architecture.md

    Multi-Region Architecture Overview

    This document describes the architecture for deploying the application across multiple AWS Regions to improve availability, reduce latency, and meet data residency requirements.

    Regional topology

    The primary Region is us-east-1, with active-active deployments in eu-west-1 and ap-southeast-1. Each Region runs an independent stack consisting of an Application Load Balancer, Amazon ECS services on Fargate, and a Regional Amazon DynamoDB table with global tables enabled.

    Traffic routing

    Amazon Route 53 latency-based routing directs users to the nearest healthy Region. Health checks monitor the ALB endpoint in each Region with a 10-second interval and 3-failure threshold before failover. DNS TTL is set to 60 seconds to allow rapid rerouting during incidents.

    Data replication

    1. DynamoDB global tables — Provides multi-Region, multi-active replication with eventual consistency. Conflict resolution uses last-writer-wins based on item timestamps.
    2. Amazon S3 cross-Region replication — Static assets and user uploads replicate from the primary bucket to Regional buckets with replication time control (RTC) for predictable 15-minute SLA.
    3. Amazon ElastiCache Global Datastore — Session data replicates across Regions with sub-second lag, enabling seamless failover without session loss.

    Failover strategy

    Automated failover is handled at the DNS layer through Route 53 health checks. If a Region becomes unhealthy, traffic shifts to the next-lowest-latency Region within 60–90 seconds. Manual failover is available through a runbook that updates Route 53 routing policies and disables the affected Region's ECS services.

    Observability

    Each Region publishes metrics to a centralized Amazon CloudWatch dashboard in us-east-1 using cross-account observability. Key metrics include request latency (p50, p99), error rates, DynamoDB replication lag, and ECS task health. CloudWatch alarms trigger SNS notifications and automatically create incident tickets when thresholds are breached.

    Cost considerations

    Multi-Region deployment increases infrastructure costs by approximately 2.4x compared to a single Region. The primary cost drivers are cross-Region data transfer, DynamoDB global table write capacity, and redundant compute in each Region. Reserved capacity and Savings Plans are applied across all Regions to reduce baseline costs by 30–40%.

    General guidelines

    Do

    • Maintain a clear separation between actions that belong to the artifacts generated by AI and the conversation. For example, group actions related to the artifact preview within its card and the actions related to the chat bubble in a button group.
    • When an inline artifact preview has multiple actions, consolidate them into a single button dropdown with a ellipsis icon to reduce visual clutter and maintain a clean interface.

    Don't

    • Don’t nest artifacts into a chat bubble. Stack each artifact to ensure clarity and improve readability. For more detailed guidance on message structure and stacking patterns, refer to the generative AI chat pattern.

    Writing guidelines

    General writing guidelines

    • Use sentence case, but continue to capitalize proper nouns and brand names correctly in context.

    • Use end punctuation, except in headers and buttons. Don’t use exclamation points.

    • Use present-tense verbs and active voice.

    • Don't use please, thank you, ellipsis (...), ampersand (&), e.g., i.e., or etc. in writing.

    • Avoid directional language.

      • For example: use previous not above, use following not below.

    • Use device-independent language.

      • For example: use choose or select not click.

    Component-specific guidelines

    Artifact metadata

    • Express the file size using standard units such as KB, MB, or GB.

    Accessibility guidelines

    General accessibility guidelines

    • Follow the guidelines on alternative text and Accessible Rich Internet Applications (ARIA) regions for each component.

    • Make sure to define ARIA labels aligned with the language context of your application.

    • Don't add unnecessary markup for roles and landmarks. Follow the guidelines for each component.

    • Provide keyboard functionality to all available content in a logical and predictable order. The flow of information should make sense.

    Did this page help you?

    Your feedback helps us improve our documentation.
    Provide additional feedback
    • About
    • Connect
    • Privacy 
    • Site terms 
    • © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    Made with ❤️ at AWS