Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnnyopao/awsp
Switch AWS Profiles Easily
https://github.com/johnnyopao/awsp
Last synced: 3 months ago
JSON representation
Switch AWS Profiles Easily
- Host: GitHub
- URL: https://github.com/johnnyopao/awsp
- Owner: johnnyopao
- Created: 2018-02-02T22:15:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T18:40:24.000Z (over 3 years ago)
- Last Synced: 2024-06-21T16:47:35.612Z (5 months ago)
- Language: JavaScript
- Size: 3.4 MB
- Stars: 329
- Watchers: 6
- Forks: 46
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWSP - AWS Profile Switcher
Easily switch between AWS Profiles
## Prereqs
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 doc for more information
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html## Setup
```sh
npm install -g awsp
```Add the following to your `.bashrc` or `.zshrc` config
```sh
alias awsp="source _awsp"
```## Usage
```sh
awsp
```## Show your AWS Profile in your shell prompt
For better visibility into what your shell is set to it's helpful to configure your prompt to show the value of the env variable `AWS_PROFILE`.Here's a sample of my zsh prompt config using oh-my-zsh themes
```sh
function aws_prof {
local profile="${AWS_PROFILE:=default}"echo "%{$fg_bold[blue]%}aws:(%{$fg[yellow]%}${profile}%{$fg_bold[blue]%})%{$reset_color%} "
}
``````sh
PROMPT='OTHER_PROMPT_STUFF $(aws_prof)'
```