Skip to content

Commit fd4fe88

Browse files
authored
[Closes #604] awsctx (#611)
1 parent 7bf137b commit fd4fe88

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

docs/cloud/aws/awsctx.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ nav:
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:

0 commit comments

Comments
 (0)