title: boto issue with IAM role
body: <p>I'm trying to use AWS' recently announced "IAM roles for EC2" feature, which lets security credentials automatically get delivered to EC2 instances.  (see <a href="http://aws.amazon.com/about-aws/whats-new/2012/06/11/Announcing-IAM-Roles-for-EC2-instances/" rel="noreferrer">http://aws.amazon.com/about-aws/whats-new/2012/06/11/Announcing-IAM-Roles-for-EC2-instances/</a>).</p>
  
  <p>I've set up an instance with an IAM role as described.  I can also get (seemingly) proper access key / credentials with curl.  </p>
  
  <p>However, boto fails to do a simple call like "get_all_buckets",  even though I've turned on ALL S3 permissions for the role.</p>
  
  <p>The error I get is "The AWS Access Key Id you provided does not exist in our records"</p>
  
  <p>However, the access key listed in the error matches the one I get from curl.</p>
  
  <p>Here is the failing script, run on an EC2 instance with an IAM role attached that gives all S3 permissions:</p>
  
  <pre><code>import urllib2
  import ast
  from boto.s3.connection import S3Connection
  
  resp=urllib2.urlopen('http://169.254.169.254/latest/meta-data/iam/security-credentials/DatabaseApp').read()
  resp=ast.literal_eval(resp)
  print "access:" + resp['AccessKeyId']
  print "secret:" + resp['SecretAccessKey']
  conn = S3Connection(resp['AccessKeyId'], resp['SecretAccessKey'])
  rs= conn.get_all_buckets()
  </code></pre>