python - 如何解决 "botocore.exceptions.ClientError: An error occurred (AccessDenied)"错误?

标签 python mongodb amazon-web-services pymongo boto3

当我尝试生成凭证报告时,弹出此错误

botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GenerateCredentialReport operation: User: arn:aws:iam::111111111111:user/freshers is not authorized to perform: iam:GenerateCredentialReport on resource: *

如何修复/解决此问题?

最佳答案

基于评论。

解决方案是将缺少的权限 iam:GenerateCredentialReport 添加到用于执行 boto3 脚本的 IAM 用户或角色。

关于python - 如何解决 "botocore.exceptions.ClientError: An error occurred (AccessDenied)"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61725785/

相关文章:

c# - MongoDb 使用新的异步方法创建存储库模式

mongodb - MongoDB 中的枚举

javascript - 为什么 python 不允许将未绑定(bind)的标识符用作字典键?

Python:在 Matplotlib 中绘制均匀分布的球体

python - 在ubuntu上正确使用pip3安装tflearn

python - 是否可以访问封闭的上下文管理器?

mongodb - 将插件安装到Logstash时发生ELK错误

ios - AWS Cognito iOS 登录委托(delegate)方法 `didCompleteStepWithError ` 未调用

amazon-web-services - 如何通过 id 获取最新的共享 AWS RDS 快照?

java - bash 脚本问题启动程序