Skip to content

Accessing host metadata from ECS tasks

0

I know that it's possible to access metadata about ECS tasks using the ECS task metadata endpoint. Is it possible to access the host metadata from a task if the task is running on an ECS EC2 instance? How about from an ECS Fargate task?

EXPERT
asked 3 years ago2.8K views
1 Answer
0
Accepted Answer

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!

AWS
SUPPORT ENGINEER
answered 3 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.