简体   繁体   中英

Utilizing Boto3 to connect to verify if any s3 buckets that consist any ACL or Bucket policy

I have a python script that is working half way, it errors-out at for bucket in conn.buckets.all() .

Here is what I have got so far:

码

The error is:

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

I have given full access to the user and the policy that is attached to the role that is being used by the Lambda function.

conn.buckets.all() returns a list of buckets already; the next two lines after the for loop should be removed.

Thank you for your help everyone, it was just the permission issue with the role that was utilized by the lambda function. LIST permission were not specified.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM