title: How to access buckets with boto3
body: <p>Here are my permissions: <a href="https://i.stack.imgur.com/KWp2C.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KWp2C.png" alt="enter image description here"></a></p>
  
  <p>Additionally, I have this as a bucket policy:</p>
  
  <pre><code>{
      "Version": "2008-10-17",
      "Statement": [
          {
              "Sid": "",
              "Effect": "Allow",
              "Principal": {
                  "AWS": "*"
              },
              "Action": "s3:*",
              "Resource": [
                  "arn:aws:s3:::manga-learn-data",
                  "arn:aws:s3:::manga-learn-data/*"
              ]
          }
      ]
  }
  </code></pre>
  
  <p>I have this in my ~/.aws/config file:</p>
  
  <pre><code>[default]
  region=us-west-2
  </code></pre>
  
  <p>And this in my ~/.aws/credentials file:</p>
  
  <pre><code>[default]
  aws_access_key_id = &lt;access-key&gt;
  aws_secret_access_key = &lt;secret-key&gt;
  </code></pre>
  
  <p>Now I do:</p>
  
  <pre><code>&gt;&gt;&gt; import boto3
  &gt;&gt;&gt; s3 = boto3.resource('s3')
  &gt;&gt;&gt; s3.buckets.all()
  s3.bucketsCollection(s3.ServiceResource(), s3.Bucket)
  &gt;&gt;&gt; for bucket in s3.buckets.all():
  ...         print(bucket.name)
  ...
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/Users/alex/anaconda2/lib/python2.7/site-packages/boto3/resources/collection.py", line 83, in __iter__
      for page in self.pages():
    File "/Users/alex/anaconda2/lib/python2.7/site-packages/boto3/resources/collection.py", line 161, in pages
      pages = [getattr(client, self._py_operation_name)(**params)]
    File "/Users/alex/anaconda2/lib/python2.7/site-packages/botocore/client.py", line 262, in _api_call
      return self._make_api_call(operation_name, kwargs)
    File "/Users/alex/anaconda2/lib/python2.7/site-packages/botocore/client.py", line 552, in _make_api_call
      raise ClientError(parsed_response, operation_name)
  botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
  </code></pre>
  
  <p>And you see the traceback there. I am following the steps here: <a href="https://github.com/boto/boto3" rel="noreferrer">https://github.com/boto/boto3</a></p>
  
  <p>Any suggestions?</p>