- Newest
- Most votes
- Most comments
This is most likely related to security feature around the EC2 metadata services. By default only the EC2 instance itself can query it as our hop limit (time to live) is set to 1. When you run an application inside a Docker daemon on Linux you are adding a hop (Docker bridge etc. add routing element to the traffic flow, aka a hop causing the time to live value to be decreased by one). You need to change the Metadata Response Hop limit to 2 on your EC2 instances. More information here. Note: The EC2 instance role would be accessible by all the containers running on this instance.
As a side note, have you considered using Elastic Container Services to run your Linux containers? Then you wouldn't need to maintain the Docker and related settings your self. The containers could get individually assigned IAM roles instead of using the EC2 instance role.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago