AccessDenied for ListObjects for S3 bucket when permissions are s3:*

前端 未结 13 807
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 22:02

I am getting:

An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied

When I try to get folder from

13条回答
  •  时光取名叫无心
    2021-01-29 22:09

    I faced with the same issue. I just added credentials config:

    aws_access_key_id = your_aws_access_key_id
    aws_secret_access_key = your_aws_secret_access_key
    

    into "~/.aws/credentials" + restart terminal for default profile.

    In the case of multi profiles --profile arg needs to be added:

    aws s3 sync ./localDir s3://bucketName --profile=${PROFILE_NAME}
    

    where PROFILE_NAME:

    .bash_profile ( or .bashrc) -> export PROFILE_NAME="yourProfileName"
    

    More info about how to config credentials and multi profiles can be found here

提交回复
热议问题