Skip to content

akerl-archived/ruby-speculate

Repository files navigation

Inactive Project: I ported this tool to Golang, in akerl/speculate due to the benefits of having a zero-dep binary to assume roles from.

speculate

Gem Version Build Status Coverage Status Code Quality MIT Licensed

Tool for assuming roles in AWS accounts

Usage

❯ speculate --help
speculate 0.0.3 -- Tool for assuming roles in AWS accounts

Usage:

  speculate [options] role-name

Options:
-a ACCOUNT_ID, --accountid ACCOUNT_ID  Account ID to assume role on
        -b, --browser      Open console URL in browser
        -l, --logout       Log out of existing console browser session first
-m [TOKEN], --mfa [TOKEN]  Use MFA when assuming role
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

This tool uses AWS's Ruby SDK, so it looks for your initial creds in the same places that library does, which is described here.

To assume the admin role on the local account, use speculate admin. If you need MFA, you can call speculate admin -m or speculate -m 123456 admin (replacing 123456 with your valid MFA code).

To assume a role on another account, use speculate -a TARGET_ACCOUNT_ID ROLE_NAME.

To open a browser window automatically with the new role, add -b. Since AWS doesn't let you log into more than one account per browser session, you can use -b -l to first open the logout URL to log you out.

Installation

gem install speculate

License

speculate is released under the MIT License. See the bundled LICENSE file for details.

About

Tool for assuming roles in AWS accounts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages