Description
Describe the bug
Impossible to specify relative minutes in cloudwatch GraphWidget and Dashboard.
I first noticed this by realizing the docs have an issue...
per: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/dashboard.ts#L48
You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months.
How can M
be both minutes and months?
After a little investigating in the UI and several CDK deployments I believe it is impossible to specify a relative minutes, given that use M
for the start string always results in months when I deploy a dashboard through CDK.
In addition, when manually modifying the start
param from the relative calendar dropdown, selecting minutes results in a string like PT3M
but selecting months results in a string like PT2160H
.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
The first issue is that M
should not be valid for both minutes and months. The second issue is that it is impossible to have a relative duration in minutes through CDK currently.
Current Behavior
Deploy a dashboard with a start
param of anything with M
, it defaults to months and there is no way to specify minutes. No errors it just silently gives you months
Reproduction Steps
Deploy a dashboard with a start
param of anything with M
, it defaults to months and there is no way to specify minutes.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.1003.0 (build b242c23)
Framework Version
No response
Node.js Version
N/A
OS
N/A
Language
Python, TypeScript, .NET, Java, Go
Language Version
No response
Other information
No response