-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
aws-s3: CDK Version 2.147.0+ has error with creating Bucket
with autoDeleteObjects=true
setting
#30895
Comments
Hi I was able to deploy this with export class DummyStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
new s3.Bucket(this, 'Bucket', {
encryption: s3.BucketEncryption.S3_MANAGED,
versioned: true,
enforceSSL: true,
minimumTLSVersion: 1.2,
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
eventBridgeEnabled: true,
});
}
} And this CDK in python with 2.147.0 with no error. s3.Bucket(
self,
"TestingBucket",
# bucket_name=f"testingbucket-asdfasdf-{CF_ACCOUNT_ID}-{CF_REGION}",
encryption=s3.BucketEncryption.S3_MANAGED,
versioned=True,
enforce_ssl=True,
minimum_tls_version=1.2,
block_public_access=s3.BlockPublicAccess.BLOCK_ALL,
auto_delete_objects=True,
removal_policy=RemovalPolicy.DESTROY,
event_bridge_enabled=True,
) my versions
I can't reproduce this issue both in CDK TypeScript and Python. Questions:
But I didn't see
|
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Hi @pahud, thanks for the quick reply. I tried your code without specifying the s3 bucket name and it is still failing. However I noticed that deploying in a different AWS account works okay. I think this issue is somehow tied only to this particular AWS account. To answer your questions:
I think for now we can probably close this issue since it is specific to my account. When I took the zip file asset from the good standing AWS account and uploaded it to the problematic AWS account via the browser, it looks like the deployment when okay. I think we can close this issue for now. EDIT: upon further investigation, I believe that there is a network configuration on my end that is blocking uploads to this s3 bucket. |
Comments on closed issues and PRs are hard for our team to see. |
Thank you for the follow-up comment. |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
Upgrading from cdk 2.146.0 -> 2.147.0 causes the following error when deploying a stack with an S3 bucket. In 2.147.0 if I set
auto_delete_objects=True,
the deployment fails with an error (error message is in a different section below). When I setauto_delete_objects=False,
the deployment is successful.The asset that fails to upload is
CustomS3AutoDeleteObjectsCustomResourceProviderHandler
.Expected Behavior
I expect the asset
CustomS3AutoDeleteObjectsCustomResourceProviderHandler
to publish successfullyCurrent Behavior
During deployment it is failing to upload the asset
Reproduction Steps
Here is my python cdk app
Possible Solution
N/A
Additional Information/Context
This is working fine in 2.146.0. It breaks from 2.147.0 to 2.149.0(latest version of as writing)
CDK CLI Version
2.147.0 (build 3338fc0)
Framework Version
No response
Node.js Version
v18.17.1
OS
mac
Language
Python
Language Version
3.11.8
Other information
No response
The text was updated successfully, but these errors were encountered: