项目

关于
轻松切换 AWS 配置文件
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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 install -g awsp
Add the following to your .bashrc or .zshrc config
alias awsp="source _awsp"
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 zsh prompt config using oh-my-zsh themes
function aws_prof {
local profile="${AWS_PROFILE:=default}"
echo "%{$fg_bold[blue]%}aws:(%{$fg[yellow]%}${profile}%{$fg_bold[blue]%})%{$reset_color%} "
}
PROMPT='OTHER_PROMPT_STUFF $(aws_prof)'
探索相关项目
加载中…