1 Answer
- Newest
- Most votes
- Most comments
0
Hello bwhaley,
If you are running your ECS task on ECS container instances (EC2 type), you can call the EC2 IMDS endpoint (http://169.254.169.254/latest/meta-data/instance-id) to get the host metadata.
However, this will not be allowed for ECS tasks running on ECS Fargate.
Hope this is helpful!
Relevant content
- asked 4 months ago
- Accepted Answerasked a month ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 days ago
Thanks. Quick follow up question: can the ECS task on EC2 then assume other roles and/or use the permissions of the host?
Answered the follow up question myself: https://aws.amazon.com/premiumsupport/knowledge-center/ecs-container-ec2-metadata/
Great, thanks for the update!