Skip to content

alanwill/aws-credy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quality Gate Status Language grade: Python CodeFactor Maintainability Codacy Badge

AWS Credy

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.

Prerequisites

In order to use Credy you need to have the following steps completed:

  1. Install the AWS CLI v2. Follow instructions here

  2. Configure the AWS config file located in ~/.aws/config. You can either update the file manually or run aws sso login --profile my-dev-app as explained here. A sample config 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

Installation is pretty simple:

macOS

  1. Run the latest aws-credy binary here.
  2. If you have Python 3.8 installed, you can clone this repo, run aws-credy.py and all required packages should automatically install.

Linux/Windows

  1. Clone this repo
  2. Have Python 3.8 installed
  3. Run aws-credy.py like aws-credy.py --help

Sample Usage

❯ ./aws-credy --profile my-dev-app
Credentials for my-dev-app updated.

Build

To create a binary build of Credy install the PyInstaller package and run pyinstaller aws-credy.py --onefile --hidden-import="pkg_resources.py2_warn"