(aws-iam): Lambda is deployed before its role's inline policies #24637
Replies: 2 comments 1 reply
-
I suspect that this issue is caused because InlinePolicies are separate resources from CloudFormation perpestive. They are not part of the role, they only have roleArn as a property. |
Beta Was this translation helpful? Give feedback.
-
I believe the lambda role will first be created follow by the lambda function and policy created at the same time. This usually will not be a problem but if you need to ensure the dependency you probably will need:
This will allow Moving this to discussion for general guidance and further discussion. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
We create a role with some inline policies. This role is used as lambda execution role.
The problem is that lambda deployment does not wait for the deployment of inline policies, which can cause errors if lambda is executed during the deployment.
Expected Behavior
Lambda should not be updated until role's inline policies are created / updated.
Current Behavior
Lambda deployment has no dependency on inline policies. They can be deployed after lambda deployment.
Reproduction Steps
CDK CLI Version
2.64.0
OS
AmazonLinux
Language
.NET
Beta Was this translation helpful? Give feedback.
All reactions