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 8 months ago
- asked 3 years 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!