Skip to content
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 calls DeleteBucketPolicy and PutBucketNotification at the same time causes an conflicting operation error.) #24762

Closed
hulu-xu opened this issue Mar 23, 2023 · 6 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. duplicate This issue is a duplicate. p2

Comments

@hulu-xu
Copy link

hulu-xu commented Mar 23, 2023

Describe the bug

We often get these occasional errors in our smoke tests deployed by aws cdk.
image
image
image

By digging through the event logs in cloudtrail, we found that if cdk calls DeleteBucketPolicy and PutBucketNotification at the same time. One of these operations will raise an error for a conflicting operation.
image
image

Expected Behavior

The operations on the bucket can be performed in sequence.
image

Current Behavior

cdk calls DeleteBucketPolicy and PutBucketNotification at the same time causes an conflicting operation error.

Reproduction Steps

This error is uncontrollable. It is sometimes absent and sometimes too frequent. It always occurs when deleting a bucket stack with a bucket policy and bucket notifications.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.59.0

Framework Version

No response

Node.js Version

16

OS

linux

Language

Python

Language Version

3.10

Other information

No response

@hulu-xu hulu-xu added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 23, 2023
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Mar 23, 2023
@peterwoodworth
Copy link
Contributor

Could you please detail more information regarding your setup, which constructs are producing this error and how you've configured them (reproduction code), how often this is occurring, etc.

@peterwoodworth peterwoodworth added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 23, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 25, 2023
@hulu-xu
Copy link
Author

hulu-xu commented Mar 27, 2023

Hi @peterwoodworth , we use both of these methods to add configurations to the bucket and then deploy it via cdk deploy. When running cdk destroy, a conflicts operation error sometimes occur.
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_s3/IBucket.html#aws_cdk.aws_s3.IBucket.add_event_notification
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_s3/IBucket.html#aws_cdk.aws_s3.IBucket.add_to_resource_policy

@hulu-xu
Copy link
Author

hulu-xu commented Mar 27, 2023

same issue 16811

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Mar 27, 2023
@peterwoodworth peterwoodworth added the duplicate This issue is a duplicate. label Apr 6, 2023
@peterwoodworth
Copy link
Contributor

It looks like we can close this as a duplicate then 🙂 Thanks for reporting

@peterwoodworth peterwoodworth closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. duplicate This issue is a duplicate. p2
Projects
None yet
Development

No branches or pull requests

2 participants