Giter VIP home page Giter VIP logo

ebp's Introduction

AWSP - AWS Profile Switcher

Easily switch between AWS Profiles

Prereqs

Have profiles setup using the aws cli. Do not setup a default profile (see below for why)

aws configure --profile PROFILE_NAME

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

Setup

npm install -g awsp

Add the following to your .bashrc or .zshrc config

alias awsp="source _awsp"

Usage

awsp

Recommended Practices

Default Profiles

Default profiles are not currently supported. This was intentionally done so the user explicitly selects a profile in each shell.

All profiles need to be defined in ~/.aws/config with the prefix [profile ...]

[profile sandbox]

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

function aws_prof {
  local profile="${AWS_PROFILE}"

  if [[ -z "${profile}" ]]
  then echo ""
  else echo "%{$fg_bold[blue]%}aws:(%{$fg[yellow]%}${profile}%{$fg_bold[blue]%})%{$reset_color%} "
  fi
}
PROMPT='OTHER_PROMPT_STUFF $(aws_prof)'

ebp's People

Watchers

James Cloos avatar Ivan Polchenko avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.