This topic describes how to assume a Resource Access Management (RAM) role whose trusted entity is an Alibaba Cloud account as a RAM user by using the Alibaba Cloud Management Console or the RAM API.
Prerequisites
Before you can assume a RAM role, make sure that you have completed the following operations:
- Create a RAM user.
- Create an AccessKey pair or configure a logon password for the RAM user.
- If you want to assume a RAM role as the RAM user by logging on to the Alibaba Cloud Management Console, configure a logon password for the RAM user. For more information, see Change the password of a RAM user.
- If you want to assume a RAM as the RAM user by using the RAM API, create an AccessKey pair for the RAM user. For more information, see Create an AccessKey pair for a RAM user.
- Grant permissions to a RAM user.
- To allow the RAM user to assume all RAM roles, attach the system policy
AliyunSTSAssumeRoleAccess
to the RAM user. - To allow the RAM user to assume a specific RAM role, attach a custom policy to the RAM user. For more information, see Can I specify the RAM role that a RAM user can assume?.
- To allow the RAM user to assume all RAM roles, attach the system policy
Use the Alibaba Cloud Management Console
After you log on to the Alibaba Cloud Management Console as a RAM user, you can switch your logon identity to a RAM role. You can also log on to the RAM console by using a password or role-based single sign-on (SSO).
Use the RAM API
An authorized RAM user can use an AccessKey pair to call the AssumeRole operation. This way, the RAM user obtains an STS token and can use the STS token to access Alibaba Cloud resources.
References
For more information about how to log on to the Alibaba Cloud Management Console by using role-based SSO, see Overview of role-based SSO.