website icon indicating copy to clipboard operation
website copied to clipboard

s3 bucket no longer made public by deploy

Open sterling000 opened this issue 4 years ago • 1 comments

My vue-starter project no longer gives public read access to the access bucket when it's deployed, I have to manually make everything in the bucket public after every deploy.

Here are the steps I took to get into this state.

  1. Create a new project from the vue-starter template
  2. Run "sls" from the command line to deploy the website
  3. Open the serverless.yml and add a bucketName and domain that match.
  4. Change the app: vue-starter and the name: vue-starter to a new value
  5. Run "sls" again. Observe error that the bucket already exists for a different app and you should remove it first and redeploy.
  6. Stash the changes to the yml, and run "sls remove"
  7. Unstash your changes again and run "sls"
  8. Log into s3 and Observe that all the files in the bucket no longer have Read permissions for the Everyone group.
  9. Manually use the "Make Public" action in s3 to make everything available to the public.
  10. Run "sls" again to redeploy
  11. Refresh your website and see the 403 errors again, confirming in s3 that the files are no longer public again.

sterling000 avatar Jul 29 '20 03:07 sterling000

Has anyone found a fix for this?

wylie39 avatar Jun 13 '22 23:06 wylie39