Switch between AWS profiles using fzf

A short snippet allowing you to update your AWS_PROFILE environment variable by choosing the aws profile with fzf. Much more readable and robust than extracting content from the ~/.aws/config file with a sed or awk command as I have seen on other snippets.

alias aws_profile='export AWS_PROFILE=$(aws configure list-profiles | fzf --prompt "Choose active AWS profile:")'

Source : https://maido.io/posts/awsprofile/