title: How can I resolve the error "The security token included in the request is invalid" when running aws iam upload-server-certificate?
body: <p>I <code>cd</code> into the directory where all the pem/key files are and run the following:</p>
  
  <pre><code>aws iam upload-server-certificate 
      --server-certificate-name certificate_name 
      --certificate-body file://webservercertificate.pem  
      --private-key file://server.key   
      --certificate-chain file://certificate_chain_file.pem 
  </code></pre>
  
  <p>I get the following error: </p>
  
  <blockquote>
    <p>A client error (InvalidClientTokenId) occurred when calling the
    UploadServerCertificate operation: The security token included in the
    request is invalid.</p>
  </blockquote>
  
  <p>I have 1 'user' in 'users'. That user has been assigned the following permissions:</p>
  
  <pre><code>IAMFullAccess IAMReadOnlyAccess IAMUserSSHKeys
  </code></pre>
  
  <p>I've downloaded the credentials for this user and put them into my user variables</p>
  
  <pre><code>AWS_ACCESS_KEY ****
  AWS_SECRET_KEY ****
  </code></pre>
  
  <p>I have 1 role on my elastic beanstalk  <code>aws-elasticbeanstalk-ec2-role</code></p>