Skip to main content

gw2aws

PyPI version CI

SAML login to AWS via Google Workspace using Playwright.

Based on the behavior of the saml2aws Browser provider, gw2aws enables automated authentication for Google Workspace SSO.

Install

# mise
mise use -g pipx:gw2aws

# pipx
pipx install gw2aws

# pip
pip install gw2aws

Requirements

You must have a Google Workspace account with 2FA enabled and TOTP registered as an authentication method.

Usage

gw2aws configure --profile myprofile

gw2aws login --profile myprofile
gw2aws login --profile myprofile --no-headless

aws --profile myprofile sts get-caller-identity

Configuration

gw2aws configure writes a per-profile JSON file. Each profile holds:

Field Description op:// ok?
url Google IdP-initiated SSO (SAML) login URL
email Google Workspace account email
password Google password (optional; prompted at login if empty)
totp_url otpauth:// URL for TOTP (optional; prompted at login if empty)
region AWS region for the STS call (default us-east-1)
role_arn Role to auto-select (optional; prompted if empty and multiple roles)
session_duration STS credential lifetime in seconds (default 3600)
save_session_cookie Persist the Google session cookie to skip login on reuse

Storage locations

  • Profile config: ~/.config/gw2aws/<profile>.json (mode 0600; honors GW2AWS_CONFIG_DIR / XDG_CONFIG_HOME)
  • Session cookie: ~/.config/gw2aws/<profile>.storage_state.json
  • AWS credentials: ~/.aws/credentials (written under the profile name on login)

1Password references

email, password, and totp_url can be set to a 1Password secret reference (op://vault/item/field) instead of the raw value. At login time they are resolved via op read, so nothing secret is stored in the profile JSON. This requires the 1Password CLI to be installed and signed in.

References

Download files

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

Source Distribution

gw2aws-0.0.2.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gw2aws-0.0.2-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file gw2aws-0.0.2.tar.gz.

File metadata

  • Download URL: gw2aws-0.0.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gw2aws-0.0.2.tar.gz
Algorithm Hash digest
SHA256 71c852b8a5de339c36fc3796c9e137c07d27eacfaf0a0ddcb4d7f1151f1197ce
MD5 146bd96e3ec5feda32092d18aace3105
BLAKE2b-256 514cd335606122a390291c638d9d72289330849940b24b147f7b298f156fffec

See more details on using hashes here.

File details

Details for the file gw2aws-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: gw2aws-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gw2aws-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec49cf58ad2c7c6f32ff31d316a320acbede1ece9442a6a6e2c4235cdf56c056
MD5 2a8bed407a2955842416b744ece31c37
BLAKE2b-256 a8702e533a227053277a99a8121ae7b7ea4f31f605bf7429fe8c5f9e9ea41e08

See more details on using hashes here.

Supported by

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