-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_cloudwatch: Metric class dimensions property limited to 10 items #29322
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Comments
ruvimrd
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 29, 2024
github-actions
bot
added
the
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
label
Feb 29, 2024
1 task
pahud
added
p2
effort/small
Small work item – less than a day of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 1, 2024
Thank you for the pull request! |
1 task
mergify bot
pushed a commit
that referenced
this issue
Mar 1, 2024
### Issue # (if applicable) Closes #29322. ### Reason for this change [AWS::CloudWatch::Alarm](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html) allows up to 30 dimension items, while the L2 [construct](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Metric.html#dimensions) for Metric allows up to 10. ### Description of changes Increased hard limit from 10 -> 30 ### Description of how you validated changes Updated unit test, added new integration test ### 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*
|
godwingrs22
pushed a commit
to godwingrs22/aws-cdk
that referenced
this issue
Mar 1, 2024
### Issue # (if applicable) Closes aws#29322. ### Reason for this change [AWS::CloudWatch::Alarm](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html) allows up to 30 dimension items, while the L2 [construct](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Metric.html#dimensions) for Metric allows up to 10. ### Description of changes Increased hard limit from 10 -> 30 ### Description of how you validated changes Updated unit test, added new integration test ### 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*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
Property: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Metric.html#dimensions
CloudFormation allows up to 30 items for the 'dimensions' property as seen here.
Currently CDK limits the items to a maximum amount of 10.
Code with the hard limit: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts#L512-L514
If you need to deploy an Alarm with more than 30 dimensions, the L1 CfnAlarm has to be used.
Expected Behavior
Up to 30 items should be allowed for the dimensions property
Current Behavior
Error thrown:
The maximum number of dimensions is 10, received 11
Reproduction Steps
Simple reproduction:
//Uncomment d11 dimension above to get the error
Possible Solution
Change hard limits from 10 to 30 here: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts#L512-L514
Additional Information/Context
No response
CDK CLI Version
2.130.0
Framework Version
No response
Node.js Version
18.19.1
OS
macOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: