Bundle export-import. Restore info from dependencies

Hi, I am using the following commands to perform a backup of my dashboard (and dependent analyses and datasets), and then import the same dashboard to restore the saved version:

aws quicksight start-asset-bundle-export-job --aws-account-id=XXXX --asset-bundle-export-job-id="quicksight-export-bundle-job" --resource-arns=arn:aws:quicksight:eu-west-1:XXXX:dashboard/XXXX --export-format="QUICKSIGHT_JSON" --include-all-dependencies
aws quicksight describe-asset-bundle-export-job --aws-account-id=XXXX --asset-bundle-export-job-id="quicksight-export-bundle-job"

aws quicksight start-asset-bundle-import-job --aws-account-id=XXXX --asset-bundle-import-job-id="quicksight-import-bundle-job" --asset-bundle-import-source-bytes=fileb://assetbundle-quicksight-export-bundle-job.qs
aws quicksight describe-asset-bundle-import-job --aws-account-id=XXXX --asset-bundle-import-job-id="quicksight-import-bundle-job"

Between the export and import commands, I’m modifying the analysis underneath the dashboard and then publishing a V2 version of the dashboard. When I call the import API to restore the dashboard, it successfully goes back to V1… but the analysis remains in the V2 version, and I would like to go back to V1. I’m pretty sure this can be achieved with the --include-all-dependencies flag but I couldn’t figure it out. I didn’t test for datasets version, but it should also work for them.

Also, is it possible to restore a deleted dashboard using this API call? Or create a new panel based on the exported json?

Cheers, thanks for your time!

Hi @albmargar,

For what I see on the first line, you are only exporting the dashboard. For the Analysis to be exported you also need to add the arn of the Analysis.

The --include-all-dependencies includes “any theme, dataset, and data source resource that is a dependency of the dashboard is also exported.”

Can you try to include the analysis arn in the list of assets to be bundled and try importing them to see if this solves your issue?

Please let us know if this solves your use case.

Kind regards,


Thanks @andres007, including the analysis arn works! So it is enough to just include the analysis/dashboard arn to also backup to previous versions of the dataset?

I also have another question. Does this API call work if the dashboard is deleted? I tried to import after deleting the dashboard and the dashboard nor the analysis was rolled back.

Do you mean the export or import API? The export API expects all the ARNs you provided exist in the system. Import API performs upserts.

1 Like