aws cli output automatically being sent to vi
Just run your command with --no-cli-pager
like so
aws ec2 describe-instances --no-cli-pager
You can also run a one liner command:
aws configure set cli_pager ""
It was the PAGER environment variable set to "less" (which I was confusing with vi).
This fix is to update the ~/.aws/config file and setting cli_pager to an empty value, e.g. :
[default]
region = us-west-2
output = json
cli_pager =
Thank you to Sorin who commented on my question lead me to the answer.