title: How to access other AWS services from inside a AWS ECS container on a EC2 host?
body: <p>From AWS documentations, a program running in AWS EC2 instance created with the correct IAM role could use AWS SDK to get temporary <code>aws_access_key_id</code> and <code>aws_secret_access_key</code> for accessing desired aws resources. Does that apply for programs running inside a docker container in that instance? In my case, the container is started via AWS ECS and the program inside the container needs to access s3.</p>
  
  <p>If that is not general practice, what is the proper way of accessing a file stored in s3 from inside a container?</p>