Skip to content

Switch AWS Profiles easily

Why

When you use AWS Identity Centre, you have multiple roles for multiple accounts, so your list of profiles gets hard to remember

How

Add the below to your ~/.zshrc

alias awsctx="export AWS_PROFILE=\$(aws configure list-profiles | fzf --prompt \"Pick your AWS Profile:\")"

fzf

Ensure you have fzf installed

brew install fzf

You can then use to select your profile by running

awsctx

Want to make this site better? Open a PR or help fund hosting costs