Skip to content

Quicksight asset bundle cloud formation stack fails due to validation errors

0

I am trying to test the basic deployment of a quicksight dashboard between two accounts, using asset bundles and cloud formation templates. Following the steps described here: https://aws.amazon.com/blogs/business-intelligence/choosing-between-the-two-export-options-of-the-amazon-quicksight-asset-deployment-apis/.

My dashboard uses two datasets from the same datasource. My datasource is an RDS instance, through a VPC connection.

I use the following command in the source account to export the cloud-formation template:

aws quicksight start-asset-bundle-export-job --aws-account-id <source-account-id> --asset-bundle-export-job-id <job-id> --resource-arns <dashboard-arn> --include-all-dependencies --export-format CLOUDFORMATION_JSON --cloud-formation-override-property-configuration <overrides>

Where the <overrides> are the following:

{
  "DataSources": [
    {
      "Arn": "arn:aws:quicksight:eu-west-1:047803882418:datasource/20e1baa4-971e-415b-b32b-5cbb6ee7ccf0",
      "Properties": [
        "Username",
        "Password",
        "Database",
        "InstanceId"
      ]
    }
  ]
}

And the following command to deploy to the target account:

aws cloudformation create-stack --stack-name <stack-name> --disable-rollback --template-url <s3 url for the template> --region <region> --parameters <my-parameters>

The stack creation/update fails with an "extraneous key [...] is not permitted" validation error. None of the failed keys are specified in any of the parameters or overrides I provided. I ended up editing the failing key manually out of the template and repeating the stack update, until it succeeds.

I have encountered error for the following keys so far:

  • QactionsOption key of the #/DashboardPublishOptions
  • CustomActionDefaults of the #/Definition/Options.

Do I miss something obvious here?

1 Answer
0
    The issue you're encountering with validation errors in your QuickSight asset bundle CloudFormation deployment is likely related to template compatibility issues between your source and destination environments.

    When exporting QuickSight assets as CloudFormation templates, there are several common issues that can cause validation errors:

    1. **Template Size Limitations**: CloudFormation templates have a size limit of 1MB. If your dashboard is complex with multiple datasets and visualizations, the template might exceed this limit. For larger templates, you should upload them to an S3 bucket and use the `--template-url` parameter as you're doing.

    2. **Region Compatibility**: The error "Unrecognized resource types" can occur when you try to deploy a resource in a region where it's not supported. Ensure QuickSight is available in the target region.

    3. **Template Format Errors**: The specific validation errors you're seeing with `QactionsOption` and `CustomActionDefaults` suggest that the CloudFormation template contains properties that aren't recognized in the target environment. This could be due to:
       - Version differences between QuickSight in source and target accounts
       - Features used in your dashboard that aren't supported in the target environment
       - The export process including properties that aren't properly formatted for CloudFormation

    To resolve these issues:

    1. Try using the latest version of the QuickSight asset bundle export API
    2. Consider using the `QUICKSIGHT_JSON` export format instead of `CLOUDFORMATION_JSON` as it might handle these properties better
    3. If you need to continue with CloudFormation, you may need to manually edit the template to remove problematic properties as you've been doing
    4. Ensure both accounts have the same QuickSight edition (Standard or Enterprise)
    5. Check that all necessary permissions are in place in both accounts

    If you continue to face issues, breaking down your dashboard into smaller components or using the alternative `QUICKSIGHT_JSON` format might be more reliable for complex dashboards.
  

Sources
Cloud intelligence dashboard not deploying from cloud formation. Unrecognized resource types: [AWS::QuickSight::DataSource] | AWS re:Post
Migrating QuickSight dashboards from one AWS account to another | AWS re:Post
QuickSight data source creation via CloudFormation fails with "Resource of type 'AWS::QuickSight::DataSource' with identifier 'ds1' was not found." | AWS re:Post
Cloudformation template error solely in my AWS account, not another account? | AWS re:Post

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.