Skip to main content

Easily switch between AWS Credential profiles.

Project description

AWS Credential Picker (aws-creds)

Makes it easier to use multiple AWS accounts when you don't have SSO available. You can easily save multiple profiles, and then log into them with an simple set of commands.

Installing

This utility is available in PyPi and can be installed by running:

python3 -m pip install aws-creds

Usage

MacBook-Pro:aws-creds HammoTime$ aws-creds --help
Usage: aws-creds [OPTIONS] COMMAND [ARGS]...

  aws-creds makes it easier to use multiple AWS accounts when you don't have
  SSO available.  You can easily save multiple profiles, and then log into
  them with an simple set of commands.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  add      Adds a new credential profile.
  default  Used to set the defaults for output type and region.
  login    Sets the user's AWS credentials to the selected profile.
  logout   Deletes user's current AWS credentials.
  ls       Lists all of the saved profiles.
  rm       Deletes the selected profile.
  rotate   Automatically rotates your access keys.
  status   Prints out information about the credential that is currently in...
  update   Updates the selected profile with the new values.

Commands

The following commands are available within the AWS Credential Picker.

  1. add: Add a new credential.
  2. rm: Remove a credential.
  3. ls: List all the saved credentials.
  4. login: Login using a credential.
  5. logout: Remove all of the files used by the aws-cli in ~/.aws.
  6. status: Print details about the current session (account/user).
  7. update: Updates the selected profile with new values.
  8. rotate: Rotates your Access Key if you have a spare slot available.
  9. default: Used to manage default region and output type.
    1. get: Prints out the default region and output type.
    2. set: Sets the default region and output type.

Options

The following options are available within the AWS Credential Picker.

  1. --help: Show the help screen.
  2. --version: Print version details.

How it Works

The AWS Credential Picker is quite simple in it's design. Instead of storing details in the credentials file - which can prove difficult to use with lots of profiles - we store them in a custom JSON file. When you login, you're actually doing is creating the credentials and the config file in ~/.aws. When you logout, these files are being deleted.

The reason this was created is that some AWS Utilities and 3rd Party Tools REALLY do not like it if you have multiple profiles and do not treat environment variables correctly. By always having a single credential set, utilities will ALWAYS work.

This script also provides an update on how old your Access Key is and advises you when to rotate them.

Dependencies

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

aws-creds-1.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

aws_creds-1.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file aws-creds-1.1.0.tar.gz.

File metadata

  • Download URL: aws-creds-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for aws-creds-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7debddb5a7402c73b5605cb628f996f30ea7a3829310145c076ee589d5f13a34
MD5 be1953839f41bd6062e74654b78c9f1b
BLAKE2b-256 525f9d1a310509c384a2ef8cef82536cbeb940b0662ed0fd869d848543d728c6

See more details on using hashes here.

File details

Details for the file aws_creds-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: aws_creds-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for aws_creds-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 258ae21b8da8f11543eca804461a3d7aaa7af82875e38ad62a6618be3dceea84
MD5 62ac10b17f98c9a0f7af6ea3cd030112
BLAKE2b-256 179266fd17233998d35c9f7abc1ac2d59a4280b6c92b8acca90593457a07e913

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