title: Pass AWS credentials (IAM role credentials) to code running in docker container
body: <p>When running code on an EC2 instance, the SDK you use to access AWS resources, automagically talks to a locally linked web server on 169.254.169.254 and gets that instances AWS credentials(access_key, secret) that are needed to talk to other AWS services.</p>
  
  <p>Also there are other options, like setting the credentials in ENV variables or passing them as command line args ...</p>
  
  <p>What is the best practice here? I really prefer to let the container access the 169.254.169.254 (by routing the requests) or even better run a proxy container that mimics the behavior of the real server at 169.254.169.254. </p>
  
  <p>Is there already a solution out there?</p>