Trying to set up Amazon's S3 bucket: 403 Forbidden error & setting permissions

前端 未结 7 2050
Happy的楠姐
Happy的楠姐 2021-01-03 02:52

I\'m following Hartl\'s railstutorial.org and have arrived at 11.4.4: Image upload in production. What I\'ve done:

  • Signed up for Amazon Web Services
  • I
7条回答
  •  感动是毒
    2021-01-03 03:26

    I had both the issues from the tutorial -

    Look in your heroku logs -

    Forbidden

    and

    Socket Error

    Going round trying to resolve this over a day I basically reset back to basics, Recreated a new IAM user and a new s3 bucket but this time left the REGION as US standard - the only s3 authority I could find to attach as the policy was full access - nothing else - so attached that

    Also retyping and confirming ENV variables on heroku as well as COPY AND PASTING the carrier_wave.rb from tutorial - to be sure to be sure .)

    first time round I was fiddling and unsure what to do so i might of clicked a few different things- adding groups and permissions, viewing wrong things - sometimes a RESET and STEP through everything especially after exploring AWS and IMS and s3 for the first time.

    Interesting that in heroku they INSTRUCT to set the bucket region as US standard and post a warning - Be sure to create a bucket in the same region as your app to take advantage of AWS’s free in-region data transfer rates.

    good read for heroku to s3 configuration here -> https://devcenter.heroku.com/articles/s3

提交回复
热议问题