File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ title : awsctx
3+ ---
4+
5+ ## Why
6+
7+ When you use AWS Identity Centre, you have multiple roles for multiple accounts, so your list of profiles gets hard to remember.
8+
9+ This follows a similar design to ` kubectx ` and ` kubens ` etc
10+
11+ ## How
12+
13+ Add the below to your ` ~/.zshrc `
14+
15+ ``` shell
16+ alias awsctx=" export AWS_PROFILE=\$ (aws configure list-profiles | fzf --prompt \" Pick your AWS Profile:\" )"
17+ ```
18+
19+ !!! note "fzf"
20+ Ensure you have ` fzf ` installed
21+
22+ ```shell
23+ brew install fzf
24+ ```
25+
26+ You can then use to select your profile by running
27+
28+ ``` shell
29+ awsctx
30+ ```
Original file line number Diff line number Diff line change 190190 - Cloud Providers :
191191 - AWS :
192192 - AWS CLI : cloud/aws/aws-cli.md
193+ - awsctx : cloud/aws/awsctx.md
193194 - AWS Cloud-init : cloud/aws/cloud-init-sg1.md
194195 - Switch AWS Profiles easily : cloud/aws/switch-aws-profiles-easily.md
195196 - Digital Ocean :
You can’t perform that action at this time.
0 commit comments