简体   繁体   English

AWS联合登录:(AccessDenied)调用AssumeRoleWithSAML操作时

[英]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.

相关问题 在 AWS 存储桶策略中调用任何操作时获取“AccessDenied” - Getting `AccessDenied` when calling any operation in AWS bucket policy aws - 调用 PutMetricData 操作时发生错误 (AccessDenied) - aws - An error occurred (AccessDenied) when calling the PutMetricData operation 调用ListQueues操作时AccessDenied - AccessDenied when calling the ListQueues operation 调用 UploadServerCertificate 时 AWS AccessDenied - AWS AccessDenied when calling the UploadServerCertificate 调用 AssumeRole 操作时发生错误 (AccessDenied) - An error occurred (AccessDenied) when calling the AssumeRole operation 调用CreateStack操作时发生错误(AccessDenied): - An error occurred (AccessDenied) when calling the CreateStack operation: 无法执行 AWS Pipeline 错误:“调用 PutObject 操作时发生错误 (AccessDenied):拒绝访问” - Unable to execute AWS Pipeline Error: “An error occurred (AccessDenied) when calling the PutObject operation: Access Denied” AWS - ClientError:调用 GetObject 操作时发生错误 (AccessDenied):访问被拒绝 - AWS - ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied 使用 AWS Lambda 错误将文件写入 S3 - 调用 PutObject 操作时发生错误 (AccessDenied):访问被拒绝 - Writing file to S3 with AWS Lambda errors - An error occurred (AccessDenied) when calling the PutObject operation: Access Denied ClientError: (AccessDenied) 在为用于连接 Amazon SP-API 的 AWS 账户调用 sts:AssumeRole 操作时 - ClientError: (AccessDenied) when calling the sts:AssumeRole operation for the AWS account used to connect Amazon SP-API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM