title: aws cli output automatically being sent to vi
body: <p>I am currently learning the AWS CLI (v2) and have installed it on Ubuntu 18.04. I am running zsh with oh-my-zsh installed. I am trying to get aws command output to be reported back to the terminal as a JSON string (or even as text), but the output is <strong>always</strong> redirected to vi.</p>
  
  <p>My AWS account is brand new - no EC2 instances. When I run the following command:</p>
  
  <pre><code>aws ec2 describe-instances
  </code></pre>
  
  <p>It sends the expected output value (e.g. { "Reservations": [] }), but directly to vi instead of outputting a JSON string to the terminal requiring closing vi afterwards. This occurs regardless of output format (json, text, table) or what shell I use (bash, zsh). </p>
  
  <p>I am not sure if this is a AWS CLI configuration issue/change or a shell/Linux configuration issue/change</p>
  
  <ul>
  <li>I've reviewed my .zshrc, .bashrc, .bash_profile and .bash_aliases files and have not seen any obvious solution here that would change or redirect output. </li>
  <li>I've been scouring the AWS CLI documentation, Stack Overflow and Google and I have not found a fix or a similar case.</li>
  </ul>
  
  <p>Thank you for any/all suggestions.</p>