title: Using boto for AWS S3 Buckets for Signature V4
body: <p>I have a problem with using Python-Boto SDK for S3 Buckets for region Frankfurt. According to <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html" rel="noreferrer">Amazon link</a> this region will only support V4. 
  This <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html" rel="noreferrer">document</a> explains how to add V4 support for Boto SDK. 
  I have added a new section:</p>
  
  <pre><code>if not boto.config.get('s3', 'use-sigv4'):
      boto.config.add_section('s3')
      boto.config.set('s3', 'use-sigv4', 'True')
  </code></pre>
  
  <p>and then I have created new connection and got all buckets:</p>
  
  <pre><code>connection = S3Connection(accesskey, secretkey, host=S3Connection.DefaultHost)
  buckets = connection.get_all_buckets()
  </code></pre>
  
  <p>it works fine, but then I tried to get all keys for my bucket:</p>
  
  <pre><code>for bucket in buckets:
      bucket.get_all_keys()
  </code></pre>
  
  <p>and I got the following:</p>
  
  <pre><code>S3ResponseError: 400 Bad Request
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Error&gt;&lt;Code&gt;AuthorizationHeaderMalformed&lt;/Code&gt;&lt;Message&gt;The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-central-1'&lt;/Message&gt;&lt;Region&gt;eu-central-1&lt;/Region&gt;
  </code></pre>
  
  <p>Why did it occur?
  After that I connected to the region and got all needed data:</p>
  
  <pre><code>region_con = boto.s3.connect_to_region('eu-central-1', aws_access_key_id=accesskey, aws_secret_access_key=secretkey)
  bucket = region_con.get_bucket(bucket.name)
  bucket.get_all_keys()
  </code></pre>
  
  <p>How can I fix it properly? </p>