1 | initial version |
The method to indicate enableexecutecommand while launching Fargate containers using ecs-cli is by adding the following parameter to the task definition:
"requiresCompatibilities": [ "FARGATE" ], "cpu": "256", "memory": "512", "networkMode": "awsvpc", "executionRoleArn": "arn:aws:iam::account-id:role/task-execution-role", "family": "taskdef-family", "containerDefinitions": [ { "name": "container-1", "image": "image-url", "enableExecuteCommand": true, "essential": true, "portMappings": [ { "containerPort": 80, "protocol": "tcp" } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "logs-group", "awslogs-region": "region", "awslogs-stream-prefix": "awslogs-prefix" } }, "command": [ "my-command" ] } ] } }
In the above example, enableExecuteCommand is set to true for container-1.