Worldskills 2024
Menu
Deployment
EC2
ECR
EKS
Serverless
Other
Utility
Best Practices
Home
CLI
Other
0 Clicks
example task def with nginx reverse proxy
Copy
{ "family": "server02", "containerDefinitions": [ { "name": "nginx", "image": "581303364275.dkr.ecr.eu-central-1.amazonaws.com/pipeline:d629a1b", "cpu": 0, "portMappings": [ { "name": "nginx-8080-tcp", "containerPort": 8080, "hostPort": 8080, "protocol": "tcp" } ], "essential": true, "environment": [], "environmentFiles": [], "mountPoints": [], "volumesFrom": [], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/server02", "mode": "non-blocking", "awslogs-create-group": "true", "max-buffer-size": "25m", "awslogs-region": "eu-central-1", "awslogs-stream-prefix": "ecs" }, "secretOptions": [] }, "systemControls": [] }, { "name": "server02", "image": "581303364275.dkr.ecr.eu-central-1.amazonaws.com/ecr-practice:server02", "cpu": 0, "portMappings": [ { "name": "server02-80-tcp", "containerPort": 80, "hostPort": 80, "protocol": "tcp", "appProtocol": "http" } ], "essential": true, "environment": [], "environmentFiles": [], "mountPoints": [], "volumesFrom": [], "ulimits": [], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/server02", "mode": "non-blocking", "awslogs-create-group": "true", "max-buffer-size": "25m", "awslogs-region": "eu-central-1", "awslogs-stream-prefix": "ecs" }, "secretOptions": [] }, "systemControls": [] }, { "name": "aws-otel-collector", "image": "public.ecr.aws/aws-observability/aws-otel-collector:v0.40.0", "cpu": 0, "portMappings": [], "essential": true, "command": [ "--config=/etc/ecs/ecs-cloudwatch-xray.yaml" ], "environment": [], "mountPoints": [], "volumesFrom": [], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/ecs-aws-otel-sidecar-collector", "mode": "non-blocking", "awslogs-create-group": "true", "max-buffer-size": "25m", "awslogs-region": "eu-central-1", "awslogs-stream-prefix": "ecs" } }, "systemControls": [] } ], "taskRoleArn": "arn:aws:iam::581303364275:role/ecsTaskExecutionRole", "executionRoleArn": "arn:aws:iam::581303364275:role/ecsTaskExecutionRole", "networkMode": "awsvpc", "requiresCompatibilities": [ "FARGATE" ], "cpu": "1024", "memory": "3072", "runtimePlatform": { "cpuArchitecture": "X86_64", "operatingSystemFamily": "LINUX" } }