Creating an analysis from a template / migrating an analysis between 2 aws acc

TLDR - its it possible to generate an analysis from an existing dashboard that was created using a template or to create it via some other means?

Longer story-
We are recreating our production environment and want to “save” our current dashboards and analyses before deleting (and recreating) the Quicksight Account (enterprise)

We have created a second AWS account and created a temporary Quicksight (enterprise) account.
We have successfully been able to create a template on our source account and deployed the template to the temporary/target account dashboard following the AWS guide. however, we dont know to move the corresponding analysis / recreate it from the template or the dashboard.

How do we generate or migrate an existing analyses between 2 AWS accounts?

Thanks!

Hi adarb

Creating analysis from source template follows similar steps as you created dashboard in target account. You can use create_analysis API and using same template create in target account,

Example -
targetAnalysisCreateResponse = targetQuickSight.create_analysis(AwsAccountId=targetAccountId,
AnalysisId=sourceAnalysis[‘AnalysisId’],
Name=sourceAnalysis[‘Provide-name-of-Analysis’],
SourceEntity={
‘SourceTemplate’: {
‘DataSetReferences’: [
{
‘DataSetPlaceholder’: ‘DataSet1’,
‘DataSetArn’: targetDataSet[‘Arn’]
},
],
‘Arn’: sourceTemplate[‘Arn’]
}
},
ThemeArn=targetTheme[‘Arn’],
Permissions=sourceAnalysisPerms)
JSON(targetAnalysisCreateResponse)

Please follow steps and sample code for further reference in this link - Porting Content :: QuickSight DevOps

Please let us know if this helps with your solution,