Credy is a simple utility for AWS SSO users using AWS CLI v2 with a need to keep their AWS credentials file updated with the latest profile STS credentials.
It's written in Python and all code is in this repo, however for ease of use you can download the latest binary directly from here.
In order to use Credy you need to have the following steps completed:
-
Install the AWS CLI v2. Follow instructions here
-
Configure the AWS
config
file located in~/.aws/config
. You can either update the file manually or runaws sso login --profile my-dev-app
as explained here. A sampleconfig
file looks like:[profile my-dev-app] sso_start_url = https://company.awsapps.com/start sso_region = us-east-1 sso_account_id = 123456789012 sso_role_name = AWSPowerUserAccess region = us-east-1 [profile my-prod-app] sso_start_url = https://company.awsapps.com/start sso_region = us-east-1 sso_account_id = 123456789013 sso_role_name = AWSPowerUserAccess region = us-east-1
Installation is pretty simple:
- Run the latest
aws-credy
binary here. - If you have Python 3.8 installed, you can clone this repo, run
aws-credy.py
and all required packages should automatically install.
- Clone this repo
- Have Python 3.8 installed
- Run
aws-credy.py
likeaws-credy.py --help
❯ ./aws-credy --profile my-dev-app
Credentials for my-dev-app updated.
To create a binary build of Credy install the PyInstaller
package and run pyinstaller aws-credy.py --onefile --hidden-import="pkg_resources.py2_warn"