API - describe_template/dashboard/analysis - duplicate FilterGroup IDs

Exporting a dashboard and all its dependencies

This is pretty straight forward, start an asset bundle export job with the dashboard ARN and you’ll get a ZIP file with all the resources as directories:

  • vpcConnection
  • datasource
  • dataset
  • theme
  • dashboard

Importing an assets bundle

The tricky part comes when you’re trying to import an assets bundle. You can import it to a different AWS account or the same AWS account, but in each case there are a few things to be aware of (especially if you want to automate this):

  • if you have a label such as dev/staging/prod in your resource IDs or names you’ll have to override this in the import job.
  • the PrefixForAllResources override configuration is kind of useless if your resource ID contains dev for example. If you import this in the prod account, the ID will contain the word dev, e.g. prod-dev-vpc not great.
  • Strangely enough, if you use the PrefixForAllResources property in the override parameters, then you’ll have to prepend it to all the resource IDs in the OverrideParameters as well. I.e. if in your exported bundle you have a dataset with id dataset-1 and the prefix is abcd-, then you’ll have to reference the dataset by ID abcd-dataset-1. This caught me BIG TIME while trying to import and not understanding why my override parameters are not working.
  • VPC Connection and DataSource override parameters are difficult to identify if not structured/tagged appropriately. Make sure you tag these resources in your AWS account or name them in such a way that you can filter the correct one out.

After you’ve managed to import a bundle, be careful, there is no ROLLBACK option! You’ll have to delete each resource one-by-one, but there is a problem with that: it seems like VPC Connections can’t be deleted permanently (Delete VPC Connection permanently)

Another thing worth mentioning is that neither the export job nor the import job deal with asset permissions. Once your bundle is imported you won’t be able to see it unless you share it from “Manage Quicksight”, or using the API to add some permissions for your admin group to each resource. (Asset Bundle Import - add permissions support)

Overall the new import/export APIs are great, they significantly helped me in trying to automate this process.

I think the ideal use-case for the APIs at the moment is to export, store zip in S3, unzip, store in source control. Use the source control to track changes and audit. Use the S3 zip for disaster recovery purposes (import to same account, same resource IDs, no prefix, no override parameters).

Importing to a different account, or to the same account with a prefix is a bit tricky at the moment. E.g. if you export dev, then upload to prod with a prefix, all resources will have the word dev in the ID. If now you export prod and try to upload to dev your resource prefix will probably be something like dev-prod-dev-43643b-.... Not great.

2 Likes