website icon indicating copy to clipboard operation
website copied to clipboard

Update AWS Bucket Policy

Open asieraduriz opened this issue 6 years ago • 1 comments

When I deploy using @serverless/website I am unable to override the Bucket Policy for the S3 bucket I am creating.

Instead of it being:

"Principal": {
    "AWS": "*"
}

I would like it to be configurable to achieve:

"Principal": "*"

Is this achievable? I would say yes since I installed the NPM package locally, and I was able to find the method configureBucketForHosting inside utils.js, the Principal value is hardcoded.

Is there a way for me to create a pull request to @serverless/website? I am not able to find the open source repo

asieraduriz avatar Dec 10 '19 08:12 asieraduriz

@fasaas I agree. I would even go a step further and say the bucket policy needs to configurable (some thing passed as an input).

Reason: If you need to protect your bucket or have some custom bucket level policies, the current setup overridden bucket policies after every deployment.

@eahefnawy Thoughts ?

avinasherupaka avatar Dec 19 '19 21:12 avinasherupaka