-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
❗ NOTICE (elasticloadbalancerv2): ApplicationLoadBalancer failing with "RuntimeError: TypeError: Cannot read properties of undefined (reading 'shouldSynthesize')" in v2.106.0 #27928
Comments
Yes I ca reproduce this. const alb = new elbv2.ApplicationLoadBalancer(this, 'ALB', {
vpc: getDefaultVpc(this),
});
const bucket = s3.Bucket.fromBucketName(this, 'importedBucket', 'my-tmp-us-east-1')
alb.logAccessLogs(bucket); Error
|
Yes we have the same problem with the npm module. |
Same issue seen with 2.108.0 still . |
…27948) #27558 fixed a circular dependency issue between the bucket and the ELB when using `logAccessLogs` by adding the dependency at the L1 level. The dependency was added on both the bucket and the bucket policy (which already refers to the bucket). This introduced a new bug when adding a dependency for imported buckets (as `bucket.node.defaultChild` is `undefined`). This PR fixes the issue by adding the dependency at the L1 level on the bucket policy directly. Closes #27928. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…27948) #27558 fixed a circular dependency issue between the bucket and the ELB when using `logAccessLogs` by adding the dependency at the L1 level. The dependency was added on both the bucket and the bucket policy (which already refers to the bucket). This introduced a new bug when adding a dependency for imported buckets (as `bucket.node.defaultChild` is `undefined`). This PR fixes the issue by adding the dependency at the L1 level on the bucket policy directly. Closes #27928. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Please add your +1 👍 to let us know you have encountered this
Status: COMPLETE
Overview:
#27558 fixed a circular dependency issue between the bucket and the ELB when using logAccessLogs by adding the dependency at the L1 level. The dependency was added on both the bucket and the bucket policy (which already refers to the bucket). This introduced a new bug when adding a dependency for imported buckets (as bucket.node.defaultChild is undefined).
Root cause: #27558
Affected users: CDK users on 2.106.0-2.108.0 using ELB with imported buckets
Complete Error Message:
Workaround:
Downgrade to CDK v2.105.0, or wait for impending release CDK v2.108.1.
Solution:
#27948
Original issue reproduced below:
Describe the bug
I have a code that is creating ALBs with logAccessLogs enabled. I am passing IBucket to the method which I'm getting by referencing the bucket name with S3.fromBucketName method. In version 2.105 this piece of code has worked without any issues. Only after I switched to 2.106 I started getting issues with this. My assumption is that this is related to commit 1b86634 which fixed issue #27528
Expected Behavior
Attach bucket for ALB to use to write access logs.
Current Behavior
Fails with following errors:
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.106.0
Framework Version
2.106.0
Node.js Version
18.16.1
OS
aws-codebuild-docker-images/ubuntu/standard/7.0
Language
Python
Language Version
3.11.4
Other information
No response
The text was updated successfully, but these errors were encountered: