# aws-vault-switch: Easily Switch Between AWS Profiles

[aws-vault-switch](https://github.com/kobeBigs/aws-vault-switch) is a Go command-line interface (CLI) tool designed to enhance the functionality of [AWS Vault](https://github.com/99designs/aws-vault), enabling seamless switching between AWS profiles without the need to exit the current shell session.

It simplifies the process of managing multiple AWS accounts by listing all AWS profiles managed by AWS Vault and switching between them. It helps maintain the working context and improves efficiency.

## Installing

You can install `aws-vault-switch` by downloading the [latest release](https://github.com/kobeBigs/aws-vault-switch/releases/latest);

* on macOS, download the package and move it to `/usr/local/bin`.
    
    ```bash
    $ wget https://github.com/kobeBigs/aws-vault-switch/releases/download/v0.1.0/aws-vault-switch-mac.tar.gz 
    $ tar -xzvf aws-vault-switch-mac.tar.gz 
    $ sudo mv aws-vault-switch-mac /usr/local/bin/aws-vault-switch 
    ```
    

> if you are on macOS arm64 architecture you can download the [arm package](https://github.com/kobeBigs/aws-vault-switch/releases/download/v0.1.0/aws-vault-switch-mac-arm.tar.gz) and use the instructions above

* on linux, you can do same above using the [linux package](https://github.com/kobeBigs/aws-vault-switch/releases/download/v0.1.0/aws-vault-switch-linux.tar.gz).
    

Also, you can clone and build from [source](https://github.com/kobeBigs/aws-vault-switch).

```bash
$ git clone https://github.com/kobebigs/aws-vault-switch
$ cd aws-vault-switch
$ go build -o aws-vault-switch
```

## How to use it

```bash
# run aws-vault-switch and navigate and select using the arrow keys and enter key respectively
$ aws-vault-switch
Use the arrow keys to navigate: ↓ ↑ → ←
? Select AWS Profile:
  ▸ default
    aws-account-dev
    aws-account-prod
    aws-account-marketing
↓   aws-account-sales 
```

Note: make sure you have AWS Vault installed and setup before using aws-vault-switch.  
  
Contributions: issues, forks, and pull requests are welcome!
