Z shell plugin for accessing the AWS Federation Proxy (AFP). Inspired by afpre and by afp-cli.
Make sure you have curl
and jq
installed.
curl --version
jq --version
If you are on a Mac, make sure that GNU date
is installed:
gdate --version
# The output should look like "date (GNU coreutils) 8.32".
# If gdate is not installed, you have to install coreutils:
brew install coreutils
Add the following line to your ~/.zshrc
:
antigen bundle christophgietl/zafp --branch=main
Create a ~/.zafp.zsh
based on .zafp.zsh.template
:
cp .zafp.zsh.template ~/.zafp.zsh
# Use your favourite editor to customise ~/.zafp.zsh.
Check if zafp
and unzafp
work as intended:
# Start zafp using the defaults set in ~/.zafp.zsh:
zafp
# Try a few AWS commands:
aws s3 ls
# Stop zafp:
unzafp
# Start zafp using a different account:
zafp my-second-account
# Stop zafp:
unzafp
# Start zafp using a different role:
zafp my-second-account my-second-role
# Stop zafp:
unzafp