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

Support importing/updating of S3 bucket policy #1068

Open
swalmsley11 opened this issue Feb 9, 2022 · 3 comments
Open

Support importing/updating of S3 bucket policy #1068

swalmsley11 opened this issue Feb 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@swalmsley11
Copy link

Name of the resource

AWS::S3::BucketPolicy

Resource name

No response

Description

Currently, when trying to update the bucket policy via CloudFormation it will causing the error 'The bucket policy already exists on bucket'. In order to make changes, customer needs to delete and reapply policy, which will cause an outage because of this action.

In short, In order to update bucket policy we would need to delete and recreate it.

Other Details

No response

@swalmsley11 swalmsley11 added the enhancement New feature or request label Feb 9, 2022
@benbridts
Copy link

This is something you run into, if there is an existing bucket policy that is not managed by CloudFormation (or if you have two resources trying to manage the same bucket policy).

Assuming in this case it's the former, this would be solved (and in my opinion solved better) if AWS::S3::BucketPolicy supported Import. General issue: #276

@swalmsley11
Copy link
Author

The current use-case is specific to importing an existing bucket policy, so Thank You for the general issue link. I looked over that in my initial search.

@swalmsley11 swalmsley11 changed the title Support updating of S3 bucket policy Support importing/updating of S3 bucket policy Feb 9, 2022
@sagar794
Copy link

Based on the documentation, it seems like AWS::S3::BucketPolicy is now a resource that can be imported into CloudFormation. I haven't tested this myself nor have I seen any news on this except for the documentation update. Hopefully it works as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants