(aws-cloudwatch) CompositeAlarm uses static alarmName
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 71
Description
### Describe the bug
CompositeAlarm uses a template-static physical resource name, rather than allowing CloudFormation to generate one.
This can result in deployment failures when the same template is deployed multiple times into the same account (e.g., using ServiceCatalog).
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Library Version
_No response_
### Expected Behavior
CDK generated template omits `AlarmName` entirely.
### Current Behavior
CDK generated template includes `AlarmName` property.
### Reproduction Steps
Create any CDK app including CompositeAlarm.
### Possible Solution
_No response_
### Additional Information/Context
For impacted users there is a relatively easy workaround: use CDK escape hatch to override and delete the property.
### AWS CDK Library version (aws-cdk-lib)
2.1125.0 (build 71fd29e)
### AWS CDK CLI version
2.1106
### Node.js Version
v24.16.0
### OS
Fedora 43
### Language
Python
### Language Version
Python 3.11.15
### Other information
_No response_
Contributor guide
Research direction
Start by locating the CompositeAlarm implementation and its generated CloudFormation template in the aws-cloudwatch library. Reproduce the issue with a CDK app containing a CompositeAlarm, then verify that the synthesized template omits AlarmName and that repeated deployments no longer require a static physical name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100