简体   繁体   English

利用Boto3进行连接以验证是否有包含任何ACL或存储桶策略的s3存储桶

[英]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() . 我有一个正在运行一半的python脚本,它for bucket in conn.buckets.all()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 调用ListBuckets操作时发生错误(AccessDenied):访问被拒绝:ClientError ClientError:调用ListBuckets操作时发生了错误(AccessDenied):访问被拒绝

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. 我已经授予用户完全访问权限,并且赋予了Lambda函数所使用的角色所附加的策略。

conn.buckets.all() returns a list of buckets already; conn.buckets.all()已返回存储桶列表; the next two lines after the for loop should be removed. for循环后的下两行应删除。

Thank you for your help everyone, it was just the permission issue with the role that was utilized by the lambda function. 谢谢大家的帮助,lambda函数使用的角色只是权限问题。 LIST permission were not specified. 未指定LIST权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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