Amazon EC2 Container Service (Amazon ECS) now allows applications running in containers to directly access metadata about their environment.

Previously, if an application running in a container managed by Amazon ECS required access to information about its environment, you needed to manually call this metadata using the Docker or Amazon ECS introspection API, and inject it into the container.

Now, applications running in containers managed by Amazon ECS can directly query environmental metadata such as the Docker container and Docker image name and id, the container’s networking configuration and port mapping, as well as the ECS Task’s and Container Instance Amazon Resource Name (ARN). This makes applications running on Amazon ECS environment-aware, and enables them to self-register in Service Discovery and Configuration Management solutions.

To learn more about container metadata, see the Amazon ECS documentation. Learn more about Amazon ECS here.