Skip to main content

Generate links for switching role in AWS console

Project description

# aws-switchrole-links

[![Build Status](](

`aws-switchrole-links` is a simple script to generate links for easily switching
roles in the AWS console. It generates links that automatically fill
in the required fields so you only need to click a single button!

If you operate in a lot of different roles and accounts
or regularly clear your cookies, you may find this script useful.

## How it works

In the AWS console you can switch roles either by using the `Switch Role` link
in the upper right corner after clicking on your current profile OR directly
generate a link like

which will switch to the role `admin` in account `1234567890` in `eu-central-1`
and display it as `admin-profile` (see `examples/awscli-config`).

## Installation

git clone aws-switchrole-links
cd aws-switchrole-links
python install


pip install git+

to install the latest version from Github.

Make sure to have awscli installed (`pip install awscli`) and have configured

## Usage

usage: aws-switchrole-links [-h] [--config CONFIG] [--format {json,text}] [--verbose]

optional arguments:
-h, --help show this help message and exit
--config CONFIG jmespath expression for filtering output
--format {json,text} output format
--verbose enable verbose logging

### Example

Basic usage

$ aws-switchrole-links --format text --config examples/awscli-config
admin-profile ::

$ aws-switchrole-links --format json --config examples/awscli-config
"signinLinks": [
"parameters": {
"accountId": "1234567890",
"roleName": "admin",
"displayName": "admin-profile",
"region": "eu-central-1"
"displayName": "admin-profile",
"signinUrl": ""

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
aws_switchrole_links-1.0.0-py3.5.egg (6.8 kB) Copy SHA256 hash SHA256 Egg 3.5
aws_switchrole_links-1.0.0.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page