Complete Guide to AWS QuickSight Analysis Migration Between Accounts

Migrating AWS QuickSight analyses between accounts can seem daunting, but with the right approach and AWS’s new API capabilities, it becomes a manageable process. This comprehensive guide walks you through the manual step-by-step approach to successfully migrate your QuickSight analyses while maintaining data integrity and functionality.

What is QuickSight Analysis Migration?

QuickSight analysis migration involves transferring business intelligence dashboards, visualizations, and their underlying data connections from one AWS account to another. This process is essential when organizations restructure their AWS environments, merge accounts, or need to replicate analytics across different business units.

Key Benefits of Manual Migration

  • Full Control: Complete visibility into what’s being migrated
  • Selective Migration: Choose specific analyses to migrate
  • Data Validation: Verify each step of the process
  • Troubleshooting: Easy to identify and fix issues
  • Learning: Understand QuickSight’s internal structure

Prerequisites and Requirements

System Requirements

  • AWS CLI configured with appropriate profiles
  • QuickSight Enterprise Edition in both source and target accounts
  • PowerShell or Command Line access
  • JSON editor or text editor

Required Permissions

Ensure your AWS credentials have the following QuickSight permissions:

  • quicksight:DescribeAnalysis
  • quicksight:DescribeAnalysisDefinition
  • quicksight:CreateAnalysis
  • quicksight:ListAnalyses
  • quicksight:ListDataSources
  • quicksight:ListDataSets

Account Information Setup

For this guide, we’ll use the following example configuration:

Source Account: 565393035923 (Profile: default)
Target Account: 047002548151 (Profile: qloudx)
Region: us-east-1

Step-by-Step Migration Process

Step 1: Discover Available Analyses

First, identify which analyses exist in your source account:

aws quicksight list-analyses --aws-account-id 565393035923 --region us-east-1 --query 'AnalysisSummaryList[*].[AnalysisId,Name,Status]' --output table

This command returns a table showing all analyses with their IDs, names, and current status. Note down the AnalysisId for the analyses you want to migrate.

Step 2: Export Analysis Definition

The most critical step is extracting the complete analysis definition:

# Get basic metadata
aws quicksight describe-analysis --aws-account-id 565393035923 --analysis-id YOUR_ANALYSIS_ID --region us-east-1 > source_analysis_metadata.json

# Get the complete definition (this is the important one)
aws quicksight describe-analysis-definition --aws-account-id 565393035923 --analysis-id YOUR_ANALYSIS_ID --region us-east-1 > source_analysis_definition.json

Example for a specific analysis:

aws quicksight describe-analysis-definition --aws-account-id 565393035923 --analysis-id 98359d43-a067-454a-9a3f-45c451d6b850 --region us-east-1 > dxl_sales_dashboard_definition.json

Step 3: Inventory Target Account Resources

Before migration, catalog the available resources in your target account:

# List available data sources
aws quicksight list-data-sources --profile qloudx --aws-account-id 047002548151 --region us-east-1 --query 'DataSources[*].[DataSourceId,Name,Type]' --output table

# List available datasets
aws quicksight list-data-sets --profile qloudx --aws-account-id 047002548151 --region us-east-1 --query 'DataSetSummaries[*].[DataSetId,Name]' --output table

Important: Document these IDs as you’ll need them for the next step.

Step 4: Create Import Template

Generate a template for the new analysis:

aws quicksight create-analysis --generate-cli-skeleton > create_analysis_template.json

Step 5: Prepare the Migration JSON

This is the most complex step. Edit your create_analysis_template.json file:

{
    "AwsAccountId": "047002548151",
    "AnalysisId": "dxl-sales-dashboard-migrated-20251217",
    "Name": "DXL Sales Executive Dashboard (Migrated)",
    "Definition": {
        // COPY THE ENTIRE "Definition" OBJECT FROM source_analysis_definition.json
    },
    "Permissions": [
        {
            "Principal": "arn:aws:quicksight:us-east-1:047002548151:user/default/AWSReservedSSO_AWSAdministratorAccess_4b0a36c08ed848d7/afjal.ahamad@qloudx.com",
            "Actions": [
                "quicksight:RestoreAnalysis",
                "quicksight:UpdateAnalysisPermissions",
                "quicksight:DeleteAnalysis",
                "quicksight:DescribeAnalysisPermissions",
                "quicksight:QueryAnalysis",
                "quicksight:DescribeAnalysis",
                "quicksight:UpdateAnalysis"
            ]
        }
    ]
}

Step 6: Update Resource References

Within the Definition object, you must update all references to match your target account:

Account ID Updates

# Find and replace all instances
Find: "565393035923"
Replace: "047002548151"

Dataset ARN Updates

# Update DataSetIdentifierDeclarations
"DataSetIdentifierDeclarations": [
    {
        "Identifier": "dataset1",
        "DataSetArn": "arn:aws:quicksight:us-east-1:047002548151:dataset/NEW_DATASET_ID"
    }
]

Data Source ARN Updates

# Update any DataSourceArn references
"DataSourceArn": "arn:aws:quicksight:us-east-1:047002548151:datasource/NEW_DATASOURCE_ID"

Step 7: Execute the Migration

Import the analysis into your target account:

aws quicksight create-analysis --profile qloudx --cli-input-json file://create_analysis_template.json --region us-east-1

Step 8: Verify the Migration

Confirm the analysis was created successfully:

aws quicksight describe-analysis --profile qloudx --aws-account-id 047002548151 --analysis-id dxl-sales-dashboard-migrated-20251217 --region us-east-1 --query 'Analysis.[AnalysisId,Name,Status]'

Advanced Configuration

Creating Dashboards from Migrated Analyses

If you need to create a dashboard from your migrated analysis:

# Generate dashboard template
aws quicksight create-dashboard --generate-cli-skeleton > create_dashboard_template.json

# Use the same Definition from your analysis
{
    "AwsAccountId": "047002548151",
    "DashboardId": "dxl-sales-dashboard-migrated-20251217",
    "Name": "DXL Sales Executive Dashboard (Migrated)",
    "Definition": {
        // SAME DEFINITION AS THE ANALYSIS
    },
    "Permissions": [
        {
            "Principal": "arn:aws:quicksight:us-east-1:047002548151:user/default/YOUR_USERNAME",
            "Actions": [
                "quicksight:DescribeDashboard",
                "quicksight:ListDashboardVersions",
                "quicksight:UpdateDashboardPermissions",
                "quicksight:QueryDashboard",
                "quicksight:UpdateDashboard",
                "quicksight:DeleteDashboard",
                "quicksight:DescribeDashboardPermissions",
                "quicksight:UpdateDashboardPublishedVersion"
            ]
        }
    ]
}

Resource Mapping Strategy

Create a mapping document to track resource relationships:

=== RESOURCE MAPPING ===

Source Account: 565393035923
Target Account: 047002548151

DATASETS:
- Source: d931efc4-b3f1-4a15-9349-b82ab8b10ffb → Target: e9ea5575-7356-4d07-ba0c-7c36ec8a532f
- Source: ac8ee353-917e-4677-a276-cb2de7bf9cce → Target: 0b2e1227-97ad-438a-9c87-c31f43c3ea06

DATA SOURCES:
- Source: 66d71060-4d97-410d-905c-ceaf8154b546 → Target: b4fc2294-a44e-4afa-8e97-0dce9e1a5267
- Source: 0725ef4a-f95c-4eb0-a151-31cbba06ba2e → Target: 18c88072-67fa-4955-8105-2d48c993ac9a

ANALYSES TO MIGRATE:
- DXL Sales Executive Dashboard: 98359d43-a067-454a-9a3f-45c451d6b850

Troubleshooting Common Issues

Issue 1: “Dataset not found” Error

Problem: The analysis references datasets that don’t exist in the target account.

Solution:

  1. Verify dataset IDs in the target account
  2. Update all DataSetArn references in the Definition
  3. Ensure datasets are published and accessible
aws quicksight list-data-sets --profile qloudx --aws-account-id 047002548151 --region us-east-1

Issue 2: “Invalid JSON” Error

Problem: Syntax errors in the JSON file.

Solution:

# Validate JSON syntax
python -m json.tool create_analysis_template.json

Issue 3: “Access Denied” Error

Problem: Insufficient permissions in QuickSight.

Solution:

aws quicksight describe-user --profile qloudx --aws-account-id 047002548151 --namespace default --user-name YOUR_USERNAME --region us-east-1

Issue 4: “Token Expired” Error

Problem: AWS SSO session has expired.

Solution:

aws sso login --profile qloudx

Best Practices and Tips

Migration Planning

  • Test First: Always test with a simple analysis before migrating complex ones
  • Backup: Keep copies of all original JSON files
  • Documentation: Maintain detailed resource mapping documents
  • Validation: Verify each analysis works correctly after migration

Security Considerations

  • Review and update permissions for the target account
  • Ensure data sources have appropriate access controls
  • Validate that sensitive data isn’t exposed during migration
  • Use least-privilege principles for QuickSight permissions

Performance Optimization

  • Migrate during low-usage periods
  • Process analyses in batches to avoid API throttling
  • Monitor CloudTrail logs for any issues
  • Test performance after migration to ensure optimal response times

Verification Commands

Use these commands to verify your migration was successful:

# Check analysis status
aws quicksight describe-analysis --profile qloudx --aws-account-id 047002548151 --analysis-id dxl-sales-dashboard-migrated-20251217 --region us-east-1 --query 'Analysis.Status'

# List all analyses in target account
aws quicksight list-analyses --profile qloudx --aws-account-id 047002548151 --region us-east-1 --query 'AnalysisSummaryList[*].[AnalysisId,Name,Status]' --output table

# Access the analysis via URL
# https://quicksight.aws.amazon.com/sn/analyses/dxl-sales-dashboard-migrated-20251217

Conclusion

Successfully migrating QuickSight analyses between AWS accounts requires careful planning and attention to detail. This manual approach gives you complete control over the process and helps you understand the underlying structure of your analytics assets.

The key to success is thorough preparation: inventory your resources, create detailed mapping documents, and test with simple analyses first. By following this step-by-step guide, you can confidently migrate your QuickSight analyses while maintaining data integrity and functionality.

Remember that this process leverages AWS’s official QuickSight APIs, ensuring compatibility and following best practices. The manual approach may take more time initially, but it provides valuable insights into your analytics infrastructure and gives you the skills to handle future migrations efficiently.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *