-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.This issue was automatically closed because it hadn't received any attention in a while.guidanceQuestion that needs advice or information.Question that needs advice or information.p3response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Description
Describe the bug
Adding the same lambda as the action for multiple alarms causes an error because of logical id conflicts. The error says There is already a Construct with name 'AlarmPermission' in Function
Expected Behavior
One Lambda function can be configured as action for multiple alarms without the need to use the context @aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction
Current Behavior
There is already a Construct with name 'AlarmPermission' in Function
Reproduction Steps
alarm1.addAlarmAction(new actions.LambdaAction(lambda));
alarm2.addAlarmAction(new actions.LambdaAction(lambda));
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.140.0
Framework Version
No response
Node.js Version
18
OS
Mac
Language
TypeScript
Language Version
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.This issue was automatically closed because it hadn't received any attention in a while.guidanceQuestion that needs advice or information.Question that needs advice or information.p3response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.