Upload failed : An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
clawfire opened this issue ยท 8 comments
I tried to use your action with this config:
- name: Run AWS Cli to sync content
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1' # optional: defaults to us-east-1
SOURCE_DIR: '_site' # optional: defaults to entire repository
DEST_DIR: 'deploy_test' # optional: default to bucket root
But got this error for every files:
upload failed: _site/2019/07/24/ai4eu-the-h2020-initiative-for-a-sovereign-ai-platform-in-europe.html to s3://***/deploy_test/2019/07/24/ai4eu-the-h2020-initiative-for-a-sovereign-ai-platform-in-europe.html An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
I cloned locally the repo and lanch the docker while passing the ENV variables manually and it works perfectly. The issue is maybe in the way the env variables are passed by github action mechanism ๐ค
is actions/checkout@master
mandatory? In my case I have a previous step creating artefact so I use actions/download-artifact@v1.0.0
instead but maybe there's need for files from the repo, like the workflow file itself ?
ok I tried keeping actions/checkout@master
but still have the same error message
ok I tried keeping
actions/checkout@master
but still have the same error message
Same issue here. Tested the IAM credentials locally as well and they were fine.
@clawfire So i don't know if you have the same issue, but mine was due to the fact that my s3 bucket was set up to disable public ACLs since i was only allowing it to be served from CloudFront. If you copied the example from this you may have made the same mistake i did by leaving the --acl public-read
in the args
.
@clawfire So i don't know if you have the same issue, but mine was due to the fact that my s3 bucket was set up to disable public ACLs since i was only allowing it to be served from CloudFront. If you copied the example from this you may have made the same mistake i did by leaving the
--acl public-read
in theargs
.
I made a mental note at the beginning of this endeavor that I will have to remove the --acl public-read
arg, but at the time I got there I forgot about it.
@Chrisell thanks for your response
Hum, thanks guys, I gonna have to give it a try and tells you ;)
๐ Without --acl public-read
it works perfectly. thanks guys