Skip to main content

AWS SAML Login

Works cross platform (Win, Unix, MacOS) Was having a real hard time trying to get cli credentials via SAML SSO so thought about writing this small utility. I can run this daily every morning to get a 12 hour session for myself. Hope you'd find it interesting and useful.

Looking forward to contributions!!

Prerequisites

Need to install

  • Chromedriver ?
  • Google Chrome ?
  • Python 2/3 ?
  • AWS Cli ?

Make sure all the above software are setup properly in PATH environment variable

Executing

Add properties to your AWS credentials file

[some-profile]
saml_sso_url = <url you use for saml, either okta saml or whatever you use>
saml_role_arn = <your iam role to assume>
saml_principal_arn = <your saml idp arn>
saml_duration = <duration of session in seconds, check iam role for maximum value>

Run

python -m aws-saml

Warning: This will change your credentials file. If you don't want to do that, you can use DRY_RUN=Y python -m aws-saml which will only print the values.

Installation

pip install aws-cli-sso

Local development/testing

  • pip install -r requirements.txt
  • python -m aws-saml

Metadata

Release files for aws-cli-sso 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aws-cli-sso 0.1.0
File Interpreter ABI Platform
aws_cli_sso-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / aws_cli_sso-0.1.0-py3-none-any.whl

Download URL aws_cli_sso-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
562ca004a649028ba5510f5293c3b51b3b6f1a56b3c43a712fb707543b59771b
BLAKE2b-256 checksum
How to use checksums
690f626a676fea3544200ca34838d1c23afb33fd8738ff73e5d607b967cf8dcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page