---
name: "euare-assumerole"
section: "1"
platform: "linux"
package: "euca2ools"
version: "3.3.1-2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/euare-assumerole"
---

# euare-assumerole(1)

Assume an IAM role

## NAME

euare-assumerole - Assume an IAM role

## SYNOPSIS

euare-assumerole \[-d SECONDS\] \[--session-name PATH\] \[-c \| **-s\]**

- \[--policy-content POLICY\_CONTENT \| **--policy-document** FILE\]

  \[--external-id STR\] \[--mfa-serial MFA\] \[--mfa-code CODE\] \[-U URL\] \[--region USER@REGION\] \[-I KEY\_ID\] \[-S KEY\] \[--security-token TOKEN\] \[--debug\] \[--debugger\] \[--version\] \[-h\] ROLE

## DESCRIPTION

Assume an IAM role

## DESCRIPTION

The euare-assumerole utility obtains credentials for an IAM role and outputs them in the form of shellcode that sets environment variables that allow euca2ools commands to use them.  Use it inside an eval command to make this process seamless:

## DESCRIPTION

$ eval \`euare-assumerole myrole\`

## DESCRIPTION

To stop using the role, use [euare-releaserole(1)](/euare-releaserole/1.md).

### positional arguments:

- ROLE

  the role to assume

### optional arguments:

- **-d** SECONDS, **--duration** SECONDS

  number of seconds the credentials should be valid for (900-3600) (default: 900)

- **--session-name** PATH

  role session identifier to include in the assumed role user ID (default: automatic)

- **-c**

  generate C-shell commands on stdout (default if SHELL looks like a csh-style shell

- **-s**

  generate Bourne shell commands on stdout (default if SHELL does not look like a csh-style shell

- **--policy-content** POLICY\_CONTENT

  an IAM policy further restricting what the credentials will be allowed to do. This cannot grant additional permissions.

- **--policy-document** FILE

  file containing an IAM policy further restricting what the credentials will be allowed to do. This cannot grant additional permissions.

- **--external-id** STR

  external ID to use for comparison with policies

- **--mfa-serial** MFA

  MFA token serial number

- **--mfa-code** CODE

  MFA token code

- **-U** URL, **--url** URL

  token service endpoint URL

- **--region** USER@REGION

  region and/or user names to search when looking up config file data

**-I** KEY\_ID, **--access-key-id** KEY\_ID

**-S** KEY, **--secret-key** KEY

**--security-token** TOKEN

- **--debug**

  show debugging output

- **--debugger**

  launch interactive debugger on error

- **--version**

  show the program's version and exit

- **-h**, **--help**

  show this help message and exit
