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
gw2aws login --profile myprofile --force

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 (--force bypasses it)

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.3.tar.gz (16.5 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.3-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gw2aws-0.0.3.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.3.tar.gz
Algorithm Hash digest
SHA256 6cabf9e26eedc6bc44bad8f337a686aa99fe4908eb3d5b00faee8f6aa5043da1
MD5 9784faf17a75fb1625d584e0b8fe6a30
BLAKE2b-256 e023e724f41a4fa2ebc4d16d47cdd7b45036fe77cae9cc1271b3a1dca8da4bdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gw2aws-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d04503846c49b950f0e20fcad461a3f7fedd30f9602247afcf20d2dcc9569939
MD5 eb473e125085a3244b5983d6eddccd68
BLAKE2b-256 c28477ab8bf1a26e457d6f704fbec45a1e4f13162533cf5658f38229106cd2c9

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