- Newest
- Most votes
- Most comments
Have you followed these instructions? https://aws.amazon.com/blogs/compute/a-guide-to-locally-testing-containers-with-amazon-ecs-local-endpoints-and-docker-compose/
Scenario Three: Testing a Container that uses Task Metadata endpoints The Task Metadata endpoints are useful; they allow a container running on ECS to obtain information about itself at runtime. This enables many use cases; my favorite is that it allows you to obtain container resource usage metrics, as shown by this project.
With Amazon ECS Local Container Endpoints, you can locally test applications that use the Task Metadata V2 or V3 endpoints. If you want to use the V2 endpoint, the Docker Compose template shown at the beginning of this post is sufficient. If you want to use V3, simply add another environment variable to each of your application containers:
ECS_CONTAINER_METADATA_URI: "http://169.254.170.2/v3"
This is the environment variable defined by the V3 metadata spec.
Ensure you are also deploying the ecs-local-endpoints Image as well for your container to access
The Amazon ECS Local Container Endpoints Docker Image
image: amazon/amazon-ecs-local-container-endpoints
Relevant content
- AWS OFFICIALUpdated 14 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 10 months ago