SAML.to
  • Introduction
  • Installation
  • Configuration
    • Identity Providers
      • GitHub
    • Service Providers
      • AWS (Federated Roles)
        • Assuming Roles
          • AWS CLI
          • AWS SDKs
          • Docker
          • Terraform
          • Kubernetes
        • Adding Users
        • Adding AWS Accounts
        • Adding Roles
        • Roles for GitHub Actions
    • Configuration Reference
      • Substitutions
  • FAQs
  • Usage
    • CLI
      • login
      • assume
      • list-roles
    • GitHub Actions
      • Assume AWS Role Action
      • Config Sync Action
  • Advanced Usage
    • AWS
      • CloudWatch Dashboard Sharing
Powered by GitBook
On this page
  • With the CLI
  • Listing Roles
  • Assuming Roles
  • Using the Terminal to open a Browser Window
  • Using Environment Variables
  • In the Browser
  1. Configuration
  2. Service Providers
  3. AWS (Federated Roles)

Assuming Roles

The SAML.to CLI has a handful ways to assume AWS roles.

PreviousAWS (Federated Roles)NextAWS CLI

Last updated 2 years ago

With the CLI

First, .

Listing Roles

To know which roles are available to assume, use the list-roles subcommand.

saml-to list-roles

Assuming Roles

Using the Terminal to open a Browser Window

To interactively prompt for a role to assume, use the following command:

saml-to assume

Or, to assume a specific role, first , and provide the Role Name:

saml-to assume arn:aws:iam::123456789012:role/administrator

Protip: You can use substring matching for role names.

If the Role ARN outputted from list-roles is arn:aws:iam::123456789012:role/administrator, then you can shorten it with any unique substring of that Role ARN.

For example: saml-to assume arn:aws:iam::123456789012:role/administrator

May be shortened to: saml-to assume administrator

Using Environment Variables

If you add the --headless flag to a saml-to assume command, the appropriate environment variables will be added to the terminal environment:

$(saml-to assume administrator --headless)

Then, you may run AWS CLI commands, or run any process that uses the Environment Variables, such as the AWS SDK:

aws sts get-caller-identity

In the Browser

Go to and AWS roles can be assumed by clicking on the desired "Assume" button for a listed role.

SAML.to Apps
install the saml-to CLI
List Roles