diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index 7d8d3a99f9c2e..6ba99522b8f73 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -1200,7 +1200,7 @@ However, with the activation of this feature flag, the default branch is updated *When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID.* (fix) When this feature flag is enabled, a logical ID of `LambdaPermission` for a -`LambdaAction` will include an alarm ID. So multiple alarms for the same Lambda +`LambdaAction` will include an alarm ID. Therefore multiple alarms for the same Lambda can be created with `LambdaAction`. If the flag is set to false then it can only make one alarm for the Lambda with diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index 7d8d3a99f9c2e..6ba99522b8f73 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -1200,7 +1200,7 @@ However, with the activation of this feature flag, the default branch is updated *When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID.* (fix) When this feature flag is enabled, a logical ID of `LambdaPermission` for a -`LambdaAction` will include an alarm ID. So multiple alarms for the same Lambda +`LambdaAction` will include an alarm ID. Therefore multiple alarms for the same Lambda can be created with `LambdaAction`. If the flag is set to false then it can only make one alarm for the Lambda with diff --git a/packages/aws-cdk-lib/cx-api/README.md b/packages/aws-cdk-lib/cx-api/README.md index f25b78a5e6a26..82cf2e1596eeb 100644 --- a/packages/aws-cdk-lib/cx-api/README.md +++ b/packages/aws-cdk-lib/cx-api/README.md @@ -241,3 +241,20 @@ _cdk.json_ } } ``` + +* `@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction` + +Enable this feature flag to change the logical ID of the `LambdaPermission` for the `LambdaAction` to include an alarm ID. + +Previously, only one alarm with the `LambdaAction` could be created per Lambda. +This flag allows multiple alarms with the `LambdaAction` for the same Lambda to be created. + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true + } +} +``` diff --git a/packages/aws-cdk-lib/cx-api/lib/features.ts b/packages/aws-cdk-lib/cx-api/lib/features.ts index da4636b34dc93..e3e5ba30b552a 100644 --- a/packages/aws-cdk-lib/cx-api/lib/features.ts +++ b/packages/aws-cdk-lib/cx-api/lib/features.ts @@ -984,7 +984,7 @@ export const FLAGS: Record = { summary: 'When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID.', detailsMd: ` When this feature flag is enabled, a logical ID of \`LambdaPermission\` for a - \`LambdaAction\` will include an alarm ID. So multiple alarms for the same Lambda + \`LambdaAction\` will include an alarm ID. Therefore multiple alarms for the same Lambda can be created with \`LambdaAction\`. If the flag is set to false then it can only make one alarm for the Lambda with