11# awsd - AWS Profile Switcher in Go
22
3+ ---
4+
35<img src =" assets/awsd.png " width =" 200 " >
46
5- awsd is a command-line utility that allows you to easily switch between AWS Profiles
7+ awsd is a command-line utility that allows you to easily switch between AWS Profiles.
68
79<img src =" assets/demo.gif " width =" 500 " >
810
11+ ## Table of Contents
12+
13+ - [ Installation] ( #installation )
14+ - [ Homebrew] ( #homebrew )
15+ - [ Makefile] ( #makefile )
16+ - [ To Finish Installation] ( #to-finish-installation )
17+ - [ Usage] ( #usage )
18+ - [ Switching AWS Profiles] ( #switching-aws-profiles )
19+ - [ Persist Profile across new shells] ( #persist-profile-across-new-shells )
20+ - [ Show your AWS Profile in your shell prompt] ( #show-your-aws-profile-in-your-shell-prompt )
21+ - [ Add autocompletion] ( #add-autocompletion )
22+ - [ TL;DR (full config example)] ( #tldr-full-config-example )
23+ - [ Contributing] ( #contributing )
24+ - [ License] ( #license )
25+
926## Installation
1027
1128Make sure you have Go installed. You can download it from [ here] ( https://golang.org/dl/ ) .
@@ -49,16 +66,17 @@ To switch between different profiles files using the menu, use the following com
4966awsd
5067```
5168
52- This command will display a list of available profiles files in your ` ~/aws/config ` file. Select the one you want to use.
69+ This command will display a list of available profiles files in your ` ~/.aws/config ` file or from ` AWS_CONFIG_FILE `
70+ if you have that set. It expects for you to have named profiles in your AWS config file. Select the one you want to use.
5371
54- ## Persist Profile across new shells
72+ ### Persist Profile across new shells
5573To persist the set profile when you open new terminal windows, you can add the following to your bash profile or zshrc.
5674
5775``` bash
5876export AWS_PROFILE=$( cat ~ /.awsd)
5977```
6078
61- ## Show your AWS Profile in your shell prompt
79+ ### Show your AWS Profile in your shell prompt
6280For better visibility into what your shell is set to it can be helpful to configure your prompt to show the value of the env variable ` AWS_PROFILE ` .
6381
6482<img src =" assets/screenshot.png " width =" 700 " >
@@ -78,7 +96,7 @@ function aws_prof {
7896PROMPT=' OTHER_PROMPT_STUFF $(aws_info)'
7997```
8098
81- ## Add autocompletion
99+ ### Add autocompletion
82100You can add autocompletion when passing config as argument by adding the following to your bash profile or zshrc file.
83101` source _awsd_autocomplete `
84102
@@ -95,7 +113,7 @@ complete -o nospace -F _awsd_completion "${AWSD_CMD}"
95113
96114Now you can do ` awsd my-p ` and hit tab and if you had a profile ` my-profile ` it would autocomplete and find it.
97115
98- ## TL;DR (full config example)
116+ ### TL;DR (full config example)
99117``` bash
100118alias awsd=" source _awsd"
101119source _awsd_autocomplete
0 commit comments