Skip to content
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: Make Alarm object aware of metric region #33568

Open
2 tasks
danifv opened this issue Feb 24, 2025 · 1 comment
Open
2 tasks

aws-cloudwatch: Make Alarm object aware of metric region #33568

danifv opened this issue Feb 24, 2025 · 1 comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@danifv
Copy link

danifv commented Feb 24, 2025

Describe the feature

Alarm objects should be created in the same region as the metric they are set on.
Currently they use the parent stack's region, which might be different than that of the metric.

Deployments attempt to create an alarm in the stack's region, which if different from that of the metric will result in an error.

Use Case

This feature would allow the creation of stacks responsible for creating metrics and alarms across different regions. Currently our workaround is to create stacks for each region, which makes our IaC unnecessarily complex and redundant.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.1000.2 (build bc82193)

Environment details (OS name and version, etc.)

Debian GNU/Linux 12

@danifv danifv added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2025
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Feb 24, 2025
@pahud
Copy link
Contributor

pahud commented Feb 24, 2025

Yes, we probably need to update the Metric class to make it region-awareness and modify the Alarm constructor to extract and use the metric's region.

Making this a p2. We welcome PRs.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2025
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 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants