Create Analysis on another account via cloudformation template

Hi everyone,
I’m new to quicksight and I was trying to replicate the analysis available in one account into another one using cloudformation.

Initially i did it with a very small analysis (one sheet, some graphs and simple stuff).

I started by running the:

aws quicksight describe-analysis-definition --aws-account-id xxx --analysis-id xxx

command to get the json i needed for the cloudformation template (and tweeked a little to make it work).

Then i adjusted some variables to target the new account and everything worked just fine.

Here comes the problem, i repeated the same process on a complex analysis (n sheets, a lot of different constucts), i obtained the json, tweeked it and placed it in the cloudformation template.

I ran it and obtained the following error:

Resource handler returned message: "Invalid request provided: Duplicate SourceFilterId: e35871d0-6c17-483e-86cd-8f37817a63f9 referenced, at Filter Control a977c221-1283-4b3e-ad77-4ffacc182f45, at Sheet 33fb75c9-ebb4-441f-8432-6de4bf0d6dd0. (Service: QuickSight, Status Code: 400, Request ID: null)" (RequestToken: cd299329-05f3-0b9d-f54b-2335905e82c8, HandlerErrorCode: InvalidRequest)

I checked the code and there are 3 references to this same SourceFilterId.
So, why i get a duplication error if the code i actually obtained is given that way?
Is there a way to overcome the problem without modifying the code? (Each of those ID is linked to many elements of the sheets, the json is ~5500 lines of code).

Thanks in advance for your help!

Hi @Gianluca

Thank you for letting us know. I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!