title: AWS CLI listing S3 buckets gives SignatureDoesNotMatch error using IAM user credentials
body: <p>I am using AWS CLI on Ubuntu 16.04 LTS, I am trying to list all buckets. In aws configure I have input the IAM user access key and IAM user secret key. This IAM user has permissions to list buckets and can list buckets in the console. But using AWS CLI with these keys and running the command <code>aws s3 ls</code>, it is giving me this error:</p>
  <pre><code>A client error (SignatureDoesNotMatch) occurred when calling the ListBuckets operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.
  </code></pre>
  <p>I have created a policy to list buckets for this particular IAM user also.</p>
  <p>I want to perform further sync operations and make all files public operations via a shell script using this IAM user credentials and do not want to use root credentials.</p>