ECS MetaLens is a lightweight Flask web application designed to display task metadata.
1.2K
ECS MetaLens is a lightweight Flask web application designed to display metadata about the Amazon ECS task and container it is running in. The application fetches details from the ECS task metadata endpoint and presents them in a human-readable HTML table.
Use the following AWS CLI command to create an ECS cluster with default networking:
aws ecs create-cluster --cluster-name my-cluster
Use the following AWS CLI command to create an ECS task definition for Fargate:
aws ecs register-task-definition --family ecs-metalens-task --network-mode awsvpc --container-definitions \
'[{ \
"name": "ecs-metalens", \
"image": "cybergavin/ecs-metalens:latest", \
"portMappings": [{"containerPort": 7777, "hostPort": 7777}], \
"essential": true \
}]' --requires-compatibilities FARGATE --cpu 256 --memory 512
Use the following AWS CLI command to launch an ECS task for the registered task definition on the ECS cluster:
aws ecs run-task --cluster my-cluster \
--task-definition ecs-metalens-task \
--launch-type FARGATE \
--network-configuration 'awsvpcConfiguration={subnets=["<subnet-id>"],assignPublicIp="ENABLED"}'
where, <subnet-id> = subnet ID for one of the default subnets.
NOTE: If you are accessing the ECS service behind an ALB, then don't enable public IP.
Once the container is running on ECS, access the application via the public IP or ALB associated with the ECS service:
http://<ecs_service_public_ip>:7777
This project is released under the MIT License.
Content type
Image
Digest
sha256:5a8fa858a…
Size
19.4 MB
Last updated
over 1 year ago
docker pull cybergavin/ecs-metalens