open-constructs / aws-cdk-library

Community-Driven CDK Construct Library
Apache License 2.0
50 stars 8 forks source link

(aws-cur): Add error handling when CUR is running outside the us-east-1 region #23

Closed tomoki10 closed 1 month ago

tomoki10 commented 1 month ago

Describe the feature

AWS CUR only works in the us-east-1 region. If you run it in other regions, an error will be output when CloudFormation is executed. The error message is as follows, making it difficult to identify the cause:

TestStack failed: Error [ValidationError]: 
Template format error: Unrecognized resource types: [AWS::CUR::ReportDefinition] at Request.extractError

Proposed Solution

If CUR is running in a region other than us-east-1, add an implementation that returns an error early. This allows you to quickly notice the problem.

Other Information

This issue has been commented on in the following GitHub issue: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1565

The above issue is planned to be fixed in the following CloudFormation issue, but it has not been resolved yet. https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1825

Acknowledgements