# Assume a role in another account

Reach other accounts and roles from one you've added, like source_profile in ~/.aws/config.

Once you have one account in the app, you can add roles assumed from it. This is how you reach other accounts when you sign in with access keys, or roles outside your SSO permission sets.

Screenshot: Assume a role form: source account, role ARN, external ID, name and region

## Steps

1. Go to **Account → Add account → Assume a role**. (The option appears once you have at least one account.)
2. Under **From**, pick the account whose credentials will assume the role.
3. Enter the **Role ARN**, for example `arn:aws:iam::123456789012:role/ReadOnly`.
4. Optionally give it a **Name**, pick the region, and tap **Check and add**.

The app gets 1-hour credentials for the role and renews them as needed. The session name is `CloudConsole`, which is how it appears in CloudTrail.

## What the two sides need

The role's trust policy must trust the account (or user, or role) you assume it from:

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::111122223333:root"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
```

And the identity you assume it from needs permission to call `sts:AssumeRole` on it:

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "sts:AssumeRole",
      "Resource": "arn:aws:iam::123456789012:role/ReadOnly"
    }
  ]
}
```

## Good to know

- Roles can be chained, up to three hops.
- If the trust policy requires MFA, assume the role from an access-key account with MFA turned on.
- If the role's trust policy requires an external ID (`sts:ExternalId`), enter it in **External ID**.
- Removing the account a role is assumed from also removes the role.
- A role counts as an account: on the free plan, adding one needs [Pro](https://cloudconsole.dev/help/free-and-pro).

**Still stuck?**

Email [support@cloudconsole.dev](mailto:support@cloudconsole.dev) with what you tried and any message the app showed. Don’t send access keys or secrets. We reply within two working days.

## Related

- [Add an IAM user with access keys (and MFA)](https://cloudconsole.dev/help/connect-with-access-keys) – Connecting AWS accounts
- [Switch, rename and remove accounts](https://cloudconsole.dev/help/manage-accounts) – Connecting AWS accounts
- [Understand "No permission" and other access errors](https://cloudconsole.dev/help/access-denied) – Permissions & errors
- [Recommended read-only permissions](https://cloudconsole.dev/help/recommended-permissions) – Permissions & errors

[All help topics →](https://cloudconsole.dev/help/)

---

Source: https://cloudconsole.dev/help/assume-a-role

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
