A basic CLI tool to make it easy to manage temporary STS credentials when assuming roles.
Download the standalone executable (OSX, Linux, Windows)
NOTE The initial invocation of the CLI tool is fairly latent.
An (unencrypted) file-based cache of temporary credentials is used to prevent the need to re-authenticate whilst 'in session', so make sure your TTLs aren't too long!
You can run --help
to view all available options.
A named profile specified in ~/.aws/config
that you wish to assume the role of.
The duration of the session in seconds
A CLI command that requires you to assume a role.
If omitted, the temporary credentials will outputted to stdout. If specified, the command will be run in a child process with the temporary credentials injected in as environment variables. This saves a few clicks, and means you don't end up polluting your current shell with superfluous variables.
- Fork the repo.
- Submit a PR against
jameshopkins/aws-assume-role