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.

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, see below) except CLI itself, so...

Prerequisite

TL;DR

  • Install like so:
pip install yawsso
  • Do your per normal 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 with your normal tool.

    • i.e. cdk deploy ... or terraform ... or cw ls -p dev groups, 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!!

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:

Test

  • Create virtual environment and then:
pip install '.[test]' .
pytest
python -m unittest
  • 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.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

yawsso-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yawsso-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 731caf722c39b5ca919dcb3e46600f4bad532034c2085c3d546005d1ab8d28fe
MD5 76967bef3034e70a5e6a6c6e1e6d3d21
BLAKE2b-256 f80a45b5d9ced5834339c56589207cd8e6cc9cf28f5e68104195365afb2b5aad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yawsso-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9027e687a4bc810eb2698af91f579e64bc125accc551b910a70014e546aba4d4
MD5 27286ff333a011da21517be3116679b8
BLAKE2b-256 4bd4582c732538061c9ddc3061aad57d1431f8606eb8524225498f259d3d3b19

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