AWS STS使用问题

发布于 2025-02-08 07:14:00 字数 642 浏览 3 评论 0原文

我想为每个帐户获得所有EC2 Intansive/rds,并尝试实现这一目标。这一刻,我将所有这些都得到所有帐户(呼叫> CODE> draction_instances()/descript_db_instances())。我想使用sts来实现此目的,但是每次我运行命令时,获取错误accessDenied exception。

我将在此处提供ubuntu cli代码:

aws sts pushs pabil-role-lole-arn“ arn:aws:aws:iam ::< custom_id>:cole/sts:phoy/sts:asherole” - pasherole“ - -Orole-session-name“ custom-session”

输出看起来像这样: 在调用asherole操作时发生错误(访问):用户:arn:aws:iam ::< custom_id>:user/< custom_user>没有被授权执行:STS:资源上的假设:ARN:AWS:IAM ::< custom_id>:角色/sts:asherole

有任何想法吗?

I want to get all EC2 intances/RDS for each accounts and trying to achieve that. This moment, I am getting all of them (After call describe_instances()/describe_db_instances()) for just one account. I want to achieve this using STS, but every time I am running the command getting the error AccessDenied exception.

I am going to provide Ubuntu CLI code here:

aws sts assume-role --role-arn "arn:aws:iam::<custom_id>:role/sts:AssumeRole" --role-session-name "Custom-Session"

Output looks like this:
An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:iam::<custom_id>:user/<custom_user> is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::<custom_id>:role/sts:AssumeRole

Any ideas ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文