aws / aws/aws-cdk

aws-cloudwatch: Make Alarm object aware of metric region

Open
#33,568 1 comment 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-cloudwatch effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Trace the Alarm object creation path and the metric and parent-stack region entry points in the TypeScript aws-cloudwatch implementation. Confirm how a metric’s region is represented and how deployments currently choose the stack region. Done means alarms target the metric’s region and cross-region stacks deploy without the reported error, with regression coverage in the project’s existing test structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.