如何解决“ botocore.exceptions.ClientError:发生错误(AccessDenied)”错误?

时间:2020-05-11 08:53:35

标签: 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: *

如何解决/解决此问题?

1 个答案:

答案 0 :(得分:1)

基于评论。

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