title: Boto3 error: The AWS Access Key Id you provided does not exist in our records
body: <p>I am currently trying to get access to Amazon S3 inside a virtual machine and download files like so:</p>
  
  <pre><code>s3 = boto3.resource('s3',
           aws_access_key_id="xxxxxxxxxxx",
           aws_secret_access_key="xxxxxxxxxxxxxxxxx")
  s3client = boto3.client('s3')
  
  bucket = s3.Bucket('bucketone')
  
  for obj in bucket.objects.all():
      s3client.download_file(bucket_name, obj.key, filename)
  </code></pre>
  
  <p>But I’m getting the error:</p>
  
  <blockquote>
    <p>botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the ListObjects operation: The AWS Access Key Id you provided does not exist in our records.</p>
  </blockquote>
  
  <p>What could I be doing wrong? I checked my <code>aws_access_key_id</code> and <code>aws_secret_access_key</code> multiple times, but still getting the same error. The same code locally, but not on a virtual machine, actually works on a different computer as well.  There is a reason why I’m hardcoding in the keys, as I have to.</p>