Skip to main content

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials

Project description

yawsso

Pull Request Build Status

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials.

Prerequisite

TL;DR

pip install yawsso
  • Do your per normal SSO login like so:
aws configure sso
aws sso login --profile=dev
  • To sync for default profile, just:
yawsso
  • To sync for named profile, do:
yawsso -p dev
  • Then, continue per normal with your daily tools. i.e.

    • cdk deploy ... or
    • terraform ... or
    • cw ls -p dev groups or
    • awsbw -L -P dev
    • so on so ford...
  • To print help:

yawsso -h

Why

AWS CLI v2 SSO login cache/store credentials is somewhat different to AWS CLI v1 i.e. no longer in ~/.aws/credentials. There are many SDK and tools still depends on this legacy ~/.aws/credentials format.

And, https://github.com/aws/aws-cli/issues/4982 in CLI repo itself!!

This tool is originally based on aws_sso.py script but take different approach and depends only on AWS CLI v2 for get-role-credentials. Well, everything else fail (including boto3) except CLI itself, so...

Someday, we won't need this anymore. But, until then this tool sync up AWS CLI v2 SSO login session to legacy format auto-magically!!

Others

If this tools is not working for you, try the following:

Develop

  • Create virtual environment and then:
pip install '.[dev,test]' .
pytest
python -m unittest
python -m yawsso --debug
  • Create issue or pull request welcome

License

MIT License

License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yawsso-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

yawsso-0.2.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file yawsso-0.2.0.tar.gz.

File metadata

  • Download URL: yawsso-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for yawsso-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8f55ce8212984dcb23740be638f36304d6ae44231ad3e2177225ddf89574f77f
MD5 967d8dc208b11a4ae422d27033f8e90d
BLAKE2b-256 aa27634636d5562514e70c3889d5984ab9474038418d8e770488afd214b5a789

See more details on using hashes here.

File details

Details for the file yawsso-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: yawsso-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for yawsso-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bccaa6ee7e133a70c0266bb9252c3bc28555d07fb2801e4abcfb9179c264c762
MD5 940cf28a6f7fc08dc5fc85436969a050
BLAKE2b-256 6d172ed6c6b75de3e7f1720ae9e77d46eb43ab33a7d6567f202063f2b7c653b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page