Skip to main content

AWS Profile Switcher

Actions Status Vulnerability Check PyPI version GitHub License Commit Activity

The tool which allows you to jump between your profiles in your ~/.aws/credentials

Problematics

Well, if you are operating only one AWS account then you will not find this util useful. Problem appears when there are more than 3 accounts under your control. Sure, you can use --profile flag with any your aws cli command. But what if you need to run number of commands for several accounts, then make sure you don't forget to add --profile to your command or specified the right profile name. Another example is about Hashicorp Terraform. Let's imagine that you have one module which you need to apply for several accounts. Unfortunately, terraform doesn't allow you to specify --profile and that's logically since Terraform is not about AWS. So, you will need to hardcode your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or go to ~/.aws/credentials and change the [default] profile.

How to install

That's easy just run

sudo pip install aws-profile-switcher

Or clone this repository and run

make install

How does it work

Simple switch

Simple switch

What have you seen:

  • User called aws-profile-switcher
  • aws-profile-switcher identified that current default is among of all profiles so it allowd to proceed without any aditional operations
  • aws-profile-switcher asked user to choose new default profile
  • aws-profile-switcher switched the default

In case you have a default but no backup for it

Backup for default

What have you seen:

  • User called aws-profile-switcher
  • aws-profile-switcher understood that there is no backup for profile that is currently set to default and suggested to make a backup
  • User agreed to make a backup and gave it the name
  • aws-profile-switcher asked user to choose new default profile
  • Voila, default is changed and the old default is backed up

In case there is no default at all

No default at all

What have you seen:

  • User called aws-profile-switcher
  • aws-profile-switcher asked user to choose new default profile
  • There was no defalut profile at all, so aws-profile-switcher has created it

In case user doesn't want backing up the default

No backup for the default

What have you seen:

  • User called aws-profile-switcher
  • aws-profile-switcher understood that there is no backup for profile that is currently set to default and suggested to make a backup
  • User disagreed to make a backup
  • aws-profile-switcher asked to agreed that he/she doesn't want to make a backup
  • Default is changed and the old default was not backed up

Metadata

Release files for aws-profile-switcher 0.2.3

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

Source distribution (sdist)

Source distribution for aws-profile-switcher 0.2.3
File Size Uploaded Provenance
aws-profile-switcher-0.2.3.tar.gz 6.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-profile-switcher 0.2.3
File Interpreter ABI Platform
aws_profile_switcher-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / aws-profile-switcher-0.2.3.tar.gz

Download URL aws-profile-switcher-0.2.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c79bc29b157b704f63b25ff47bec66a46e4eedf4c1d0c839505086438d8149c7
BLAKE2b-256 checksum
How to use checksums
cb5905a894f9f65acefaf33797045abccc232d3ac567efb1dc852d3f8a99f723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

Release files / aws_profile_switcher-0.2.3-py3-none-any.whl

Download URL aws_profile_switcher-0.2.3-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a367b3becadfb095760d2c27420522e45e2b57c89f17535db69316896e47c25
BLAKE2b-256 checksum
How to use checksums
5a44e7c63bab1f3da92803b51da7c67ff8468e14a5a8f4753d013e708820bc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

Security for aws-profile-switcher 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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