当我尝试生成凭证报告时,弹出这个错误
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用户或角色。