title: How to use MFA with AWS CLI?
body: <p>How do I type in the MFA code when using the AWS CLI? I have checked the documentation page of IAM <a href="http://docs.aws.amazon.com/cli/latest/reference/iam/index.html" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/iam/index.html</a>.</p>
  
  <p>I have the MFA-Devices already enabled under my username.</p>
  
  <pre><code>aws iam list-mfa-devices --user-name X
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>{
  "MFADevices": [
      {
          "UserName": "X", 
          "SerialNumber": "arn:aws:iam::+++:mfa/X", 
          "EnableDate": "2016-01-13T23:15:43Z"
      }
  ]
  }
  </code></pre>