Skip to content

fix(cfn): Use ResourcePrefix parameter in cid-cfn.yml - #1517

Open
NithinChandranR-AWS wants to merge 1 commit into
aws-solutions-library-samples:mainfrom
NithinChandranR-AWS:fix/resource-prefix-1045
Open

fix(cfn): Use ResourcePrefix parameter in cid-cfn.yml#1517
NithinChandranR-AWS wants to merge 1 commit into
aws-solutions-library-samples:mainfrom
NithinChandranR-AWS:fix/resource-prefix-1045

Conversation

@NithinChandranR-AWS

Copy link
Copy Markdown
Contributor

Issue

Fixes #1045

Description

cid-cfn.yml hardcodes the cid prefix in 4 resource ARN references (2 S3 bucket ARNs, 2 Glue database/table ARNs). When a customer deploys data-exports-aggregation.yaml with a non-default ResourcePrefix value, the dashboard stack's IAM policy references the wrong bucket and Glue database.

Changes

  • Added ResourcePrefix parameter to cid-cfn.yml (default: cid, matching the data-exports-aggregation template)
  • Replaced hardcoded S3 bucket ARN references with ${ResourcePrefix}-${AWS::AccountId}-data-exports
  • Replaced hardcoded Glue database/table ARN references using !Join ['_', !Split ['-', !Sub '${ResourcePrefix}_data_export']] to match the naming convention in data-exports-aggregation.yaml

Backward Compatibility

Default value is cid — existing deployments are unaffected. Only customers who explicitly set a different ResourcePrefix in their data-exports stack need to pass the same value here.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Replace hardcoded 'cid' prefix in S3 bucket ARNs and Glue database
references with the ResourcePrefix parameter. This ensures cid-cfn.yml
correctly references resources created by data-exports-aggregation.yaml
when a non-default ResourcePrefix is used.

Fixes aws-solutions-library-samples#1045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CFN Template cid-cfn.yml doesn't account for ResourcePrefix

1 participant