Skip to content

stlwolf/awsp

 
 

Repository files navigation

AWSP - AWS Profile Switcher

Easily switch between AWS Profiles

Prereqs

Setup your profiles using the aws cli

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

npm i

Add the following to your .bashrc or .zshrc config

alias awsp="source ${CLONE_DIR}/awsp/run.sh"

Usage

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 bash prompt config

aws_prof() {
  local profile="${AWS_PROFILE:-default}"

  echo -e "\033[1;34maws:(\033[1;33m${profile}\033[1;34m)\033[0m"
}
PROMPT='OTHER_PROMPT_STUFF $(aws_prof)'

About

Switch AWS Profiles Easily

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 65.9%
  • Shell 34.1%