aws_s3/aws_lambda/aws_iam: Cyclic reference when bucket and policy in stack A are referenced by role/lambda in stack B #26539
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Stack A
Stack B
This results in a cyclic dependency error:
Error: 'BucketStack' depends on 'LambdaStack' (BucketStack -> LambdaStack/IAM - Role (Lambda Execution)/Resource.Ref). Adding this dependency (LambdaStack -> BucketStack/S3 - Bucket/Resource.Ref) would create a cyclic reference
Expected Behavior
The app should synth properly.
Current Behavior
Error: 'BucketStack' depends on 'LambdaStack' (BucketStack -> LambdaStack/IAM - Role (Lambda Execution)/Resource.Ref). Adding this dependency (LambdaStack -> BucketStack/S3 - Bucket/Resource.Ref) would create a cyclic reference
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.87.0 (build 9fca790)
Framework Version
No response
Node.js Version
v18.16.1
OS
macOS 13.2.1 (22D68)
Language
Typescript
Language Version
typescript@5.1.6
Other information
The text was updated successfully, but these errors were encountered: