I have a lot of dashboards in a development aws account and I need to export those dashboards from that account and import them into other accounts.
To export the dashboards, I used the StartAssetBundleExportJobCommand with AWS SDK and I managed to download the dashboards and store them into .qs files.
But when I try to import those .qs files into the other accounts, I’m facing some issues.
Export Command:
const exportCommand = new StartAssetBundleExportJobCommand({
AwsAccountId: awsAccountId,
AssetBundleExportJobId: jobId,
ResourceArns: [dashboardArn],
ExportFormat: 'QUICKSIGHT_JSON',
IncludeAllDependencies: true,
IncludePermissions: true,
IncludeTags: false,
});
I know that there’s a CLOUDFORMATION_JSON. Since I pretend to use CDK to deploy those assets, should I use this option? I tried to use it, but when I use that I always get an error saying that I need to provide a destination for the additional information that will be exported.
for the Import Job (currently using SDK too, just to test it)
const importCommand = new StartAssetBundleImportJobCommand({
AwsAccountId: awsAccountId,
AssetBundleImportJobId: jobId,
AssetBundleImportSource: {
S3Uri: s3Uri,
},
OverridePermissions:
Object.keys(overridePermissions).length > 0
? overridePermissions
: undefined,
OverrideParameters:
Object.keys(overrideParameters).length > 0
? overrideParameters
: undefined,
FailureAction: 'ROLLBACK',
and for the import job I always get an error saying that the subnets that’ were provided don’t exists.
I’m trying to use the override parameters… but probably something is wrong with that.
Can someone provide a guidance on this? Or a code template that I can use. Thanks!