Assume multiple AWS IAM roles are a single time

不问归期 提交于 2019-12-10 14:24:43

问题


On occasion, I need to access multiple AWS resources that I have individual access for with separate IAM roles. If I need these resources to be used together, I currently have to figure out a non-native connector piece.

If I could access the resources together at the same time, I can sometimes use an AWS connector to interface with both resources at once (for example).

Is there a way to assume multiple IAM roles at the same time?


回答1:


Technically, yes, there is a way to assume multiple IAM roles at the same time.

But it doesn't mean what you intend.

Assuming an IAM role doesn't modify who you are and doesn't modify what permissions you have -- contrary to the intuitive interpretation of what it might mean to assume a different identity. Instead, when you assume a role, you are given a new set of temporary credentials to use, instead of "your" credentials -- the credentials you used to assume the role.

Requests made with these temporary credentials are authorized against the permissions granted to the role.

Thus, while you can assume multiple roles at the same time, each of those actions has a separate set of associated credentials, so it won't allow you to make requests that require you to have the permissions of more than one role for any given request.

Every request is performed by a single principal, so if you are trying to perform a single action that requires the union of the permissions of multiple roles, that's a not possible.



来源:https://stackoverflow.com/questions/48876077/assume-multiple-aws-iam-roles-are-a-single-time

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!