title: Fetching AWS instance metadata from within Docker container?
body: <p>Is there a straightforward way to access AWS instance metadata from within a Docker container?</p>
  
  <p>For example, when trying to fetch credentials for an IAM role on an EC2 instance, this would work on the instance itself:</p>
  
  <pre><code>http://169.254.169.254/latest/meta-data/iam/security-credentials/my_role
  </code></pre>
  
  <p>...but not from within a Docker container running on that EC2 instance.</p>