Metadata-Version: 2.1
Name: awsswitch
Version: 0.2.2
Summary: AWS profile switcher
Author-email: Tobias Sauerwein <cgtobi@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: inquirerpy >=0.3.3
Requires-Dist: pytest >=6.2.5 ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Project-URL: Home, https://github.com/cgtobi/awsswitch
Provides-Extra: test

# awsswitch - AWS profile switcher

Easily switch between AWS Profiles.

[![PyPi](https://img.shields.io/pypi/v/awsswitch.svg)](https://pypi.python.org/pypi/awsswitch)
[![PyPi](https://img.shields.io/pypi/l/awsswitch.svg)](https://github.com/cgtobi/awsswitch/blob/master/LICENSE)

## Credits

This is a pure python implementation of [Johnny Opao's](https://github.com/johnnyopao) tool [awsp](https://github.com/johnnyopao/awsp).


<img src="awsswitch_demo.gif" width="300">


## Prerequisites

Setup your profiles using the aws cli.

```sh
aws configure --profile PROFILE_NAME
```

You can also leave out the `--profile PROFILE_NAME` param to set your `default` credentials.

Refer to this document for more information
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html


## Setup

### Install with pip

```sh
python -m pip install awsswitch
```

### Install with [pipx](https://github.com/pypa/pipx) *(recommended)*

 ```sh
pipx install awsswitch
```

### Shell configuration

Add the following to your .bashrc or .zshrc config:
```sh
alias awsp='awsswitch; sp="$(cat ~/.awsswitch)"; if [ -z "$sp" ]; then unset AWS_PROFILE; else export AWS_PROFILE="$sp";fi'
```


## Usage
```sh
awsp
```

