Permission denied error
Closed this issue · 5 comments
ankitgoyal100 commented
Hi - I’m trying to use this for a basic react app. When it runs, it uploads everything correctly, but then fails at the very end with the following error:
...
Completed 38.6 MiB/38.7 MiB (4.1 MiB/s) with 2 file(s) remaining
Completed 38.7 MiB/38.7 MiB (4.1 MiB/s) with 2 file(s) remaining
upload: build/static/media/socicon.a35b6574.svg to s3://***/static/media/socicon.a35b6574.svg
Completed 38.7 MiB/38.7 MiB (4.1 MiB/s) with 1 file(s) remaining
upload: build/static/js/2.4a354a39.chunk.js.map to s3://***/static/js/2.4a354a39.chunk.js.map
sh: /: Permission denied
The IAM user has full S3 access, so permissioning shouldn’t be an issue.
This is the code block in our Github actions workflow:
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_PRODUCTION_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: "build"
MaiKaY commented
@ankitgoyal100 how did you solve it? I am facing the same issue.
ankitgoyal100 commented
@MaiKaY i ended up creating a new bucket and it worked
MaiKaY commented
@ankitgoyal100 I just found my issue. It was because my S3 bucket was configured as "private". As soon as I turned off the Block all public access
it works for me.
alelopezperez commented
I'm having this error, and my s3 bucket is fully public, also IAM user has full S3 access
HalimSD commented
@alelopezperez How did you end up fixing it?