By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Copy QuickSight objects from one account to another

0

I need to recreate several analyses in my Prod AWS account that took days to create in my Dev AWS account. I've got working python code that exports datasets, analyses, and dashboards, and generates template files along with the analyses. I did a test in Dev where I deleted a dataset and analysis and was able to import them from the filesystem using my python code, but when I try to do the same in Prod using the files I created by exporting from Dev I get errors about the template/analysis not existing. I'm probably missing something obvious but I can't figure it out. It seems like there's a chicken and egg problem and I can't import the analysis because there needs to be a template, but I can't import the template because it needs to reference an analysis or another template, and no matter what I do I can't create a first template without getting one error or another. Help!

asked a month ago52 views
2 Answers
0

It sounds like you're encountering some challenges with migrating QuickSight assets from your Dev to Prod AWS account. The process of copying QuickSight objects between accounts has indeed been complex in the past, but there are now improved methods available that can simplify this process.

The QuickSight Asset Bundle APIs, introduced recently, offer a more streamlined approach to migrating QuickSight components from one environment to another. These APIs allow you to create a cohesive artifact that includes the top-level analysis component and its dependencies, which can be bundled and exported into the destination AWS account in a single step. This approach significantly reduces the operational complexity and potential for errors that were common in the previous multi-step process.

To use this method:

  1. In your Dev account, use the QuickSight Asset Bundle APIs to create an export job that includes all the necessary components (datasets, analyses, dashboards, etc.).

  2. Once the export is complete, you can then use these APIs to start an import job in your Prod account.

This process should help you avoid the "chicken and egg" problem you're experiencing with templates and analyses, as it handles the dependencies and relationships between different QuickSight assets automatically.

If you prefer to stick with your current Python-based approach, you might need to ensure that you're importing the assets in the correct order. Typically, you would import datasets first, then templates, then analyses, and finally dashboards. Make sure your code is handling these dependencies correctly.

Another option to consider is using the CLOUDFORMATION_JSON export format instead of QUICKSIGHT_JSON. This format exports your QuickSight assets as a CloudFormation template, which can provide more robust automation and better integration with other AWS services. It might help resolve some of the dependency issues you're encountering.

Remember that when migrating between accounts, you need to ensure that the target account (Prod in your case) has the necessary permissions to access any referenced data sources or S3 buckets that might be in the source account (Dev).

If you continue to face issues, it might be helpful to review the specific error messages you're receiving and ensure that all necessary permissions and access rights are properly set up in your Prod account.
Sources
Automate Deployment of Amazon QuickSight Assets with AWS Step Functions and QuickSight Asset Bundle APIs | AWS Partner Network (APN) Blog
Choosing between the two export options of the Amazon QuickSight asset deployment APIs | AWS Business Intelligence Blog

profile picture
answered a month ago
0

Using start_asset_bundle_export_job seems to be working for me, I just need to figure out how to update the permissions during import so I don't need an admin to give me permissions to the objects after they've been imported.

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions