Are there any way to get ecs instance metadata?

Viewed 2785

From the running aws ecs instances, can I get the detail about its cluster name and container instance ID?

In EC2, I can run below curl command to get its instance id, do I have similar command in ECS?

curl http://169.254.169.254/latest/meta-data/instance-id
2 Answers

Just to echo what @per-cederberg in his comment so it doesn't get buried (and for some free sweet karma ), the running container can call http://172.17.0.1:51678/v1/metadata to get the same information.

Related