(aws-lambda): deprecate feature flag @aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy introduced in pr-33291 #33688
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
This issue is to deprecate the feature flag @aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy ie unset the default values due to a risk found as described below. PR-33291 introducing the feature flag.
In the current implementation, we have removed a dependency of the lambda function on the policy. In addition to this, a Role will be attached to the Policy instead of an inline policy being attached to the role.
This will create a data race condition in the CloudFormation template because the creation of the Lambda function no longer waits for the policy to be created.
We recommend to unset the feature flag if already set which will restore the original behavior.
sample-app
old template
new template
Expected Policy attachment
Regression Issue
Last Known Working CDK Version
2.179.0
Expected Behavior
Expected Policy attachment
Current Behavior
Described above
Reproduction Steps
Described above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.1002.0
Framework Version
No response
Node.js Version
v23.5.0
OS
macOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: