Getting Access Denied when calling the PutObject operation with bucket-level permission

前端 未结 14 1331
醉话见心
醉话见心 2020-12-12 13:37

I followed the example on http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3 for how to grant a user access to just one buck

14条回答
  •  伪装坚强ぢ
    2020-12-12 14:03

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

    I solved the issue by passing Extra Args parameter as PutObjectAcl is disabled by company policy.

    s3_client.upload_file('./local_file.csv', 'bucket-name', 'path', ExtraArgs={'ServerSideEncryption': 'AES256'})

提交回复
热议问题