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

前端 未结 14 1232
醉话见心
醉话见心 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'})

    0 讨论(0)
  • 2020-12-12 14:04

    I was able to solve the issue by granting complete s3 access to Lambda from policies. Make a new role for Lambda and attach the policy with complete S3 Access to it.

    Hope this will help.

    0 讨论(0)
提交回复
热议问题