Skip to content

Commit

Permalink
fix(custom-resources): incorrect IAM prefix generated for CloudWatch …
Browse files Browse the repository at this point in the history
…actions (#33078)

### Issue # (if applicable)

Closes #32968.

### Reason for this change

The mapping to look up the IAM prefix from a given service has a incorrect entry for Cloudwatch. It says Cloudwatch uses `monitoring` as the prefix but it is actually `cloudwatch` instead.

I cannot find any service that uses `monitoring` as prefix so I think it is safe to assume that nothing relies on the `monitoring` value. Therefore, there is no feature flag used in this PR.

### Description of changes

Updated the IAM prefix mapping.

### Describe any new or updated permissions being added

Updated the mapping to use correct IAM prefix.

### Description of how you validated changes

Updated unit tests to use AwsCustomResource with a Cloudwatch call.

Added integ test to use AwsCustomResource with a Cloudwatch call to tag an alarm and verify the tag is indeed added successfully.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
samson-keung authored Jan 28, 2025
1 parent ab9dd0a commit c76f668
Show file tree
Hide file tree
Showing 191 changed files with 213,668 additions and 188,534 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip"
"S3Key": "cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d.zip"
},
"Handler": "index.handler",
"Role": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip"
"S3Key": "cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d.zip"
},
"Handler": "index.handler",
"Role": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit c76f668

Please sign in to comment.