aws-easy-sso

Crates.ioaws-easy-sso
lib.rsaws-easy-sso
version0.6.0
sourcesrc
created_at2023-04-12 21:47:50.677279
updated_at2024-01-12 15:31:23.631309
descriptionCLI tool to make AWS SSO more convenient.
homepagehttps://github.com/sturmm/aws-easy-sso
repositoryhttps://github.com/sturmm/aws-easy-sso
max_upload_size
id837299
size786,668
Martin Sturm (sturmm)

documentation

README

aws-easy-sso - AWS SSO on CLI made easy

aws-easy-sso is a simple tool to login to your AWS accounts using SSO. So of course it just works if you have configured SSO in you organization.

Features

The tool uses the SSO and OIDC SDK to fetch available accounts and roles for your login and appends the session and profile configuration to your ~/.aws/config. It also places the authentication information it used itself in the ~/.aws/sso/cache directory. These cached sessions are used by the newer credential provider implementations of AWS SDKs. The tool also supports usage of multiple sso sessions (combinations of sso_start_url and sso_region). For personal learning, the tool is written in Rust.

Installation

Prerequisites

This tool is build on top of the sso-session feature of the AWS CLI. So you need install a version that already supports this. To be sure simply update to the latest CLI version.

Cargo:

$ cargo install aws-easy-sso

Setup alias:

Zsh:

# To allow the program to export variables to the 'outer' env, 
# the actual scripts need to be sourced
$ echo 'alias aws-easy-sso="source _aws-easy-sso"' >> ~/.zshrc

bash:

# To allow the program to export variables to the 'outer' env, 
# the actual scripts need to be sourced
$ echo 'alias aws-easy-sso="source _aws-easy-sso"' >> ~/.bashrc

Limitations

Windows is no supported currently.

See also

There are plenty of alternatives that worked for me in the past:

Commit count: 33

cargo fmt