[英]AWS Federated Login: (AccessDenied) when calling the AssumeRoleWithSAML operation
When I try to login using federated login for AWS CLI, I get this error: 当我尝试使用针对AWS CLI的联合登录进行登录时,出现以下错误:
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the AssumeRoleWithSAML operation: Not authorized to perform sts:AssumeRoleWithSAML
This prevents me from logging into AWS CLI, and I need that so I can access our CodeCommit repo. 这使我无法登录到AWS CLI,因此我需要这样做,以便可以访问我们的CodeCommit存储库。
How should I fix this error, do I need to specify the role explicitly? 我应该如何解决此错误,我是否需要明确指定角色?
It turned out I did need to specify the role explicitly, by its ARN. 事实证明,我确实需要通过其ARN明确指定角色。
aws_cli_login --role arn:aws:iam::28475767868:role/my-role
It worked after that. 在那之后它起作用了。 Probably when I didn't specify a role it tried some default role for which I didn't have access.
可能当我没有指定角色时,它尝试了一些我没有权限的默认角色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.