A simple-ish script that triggers a single AWS ECS task and then continues to monitor that task until it terminates. Whilst running, the task's logs will be streamed and output by the script.
This script is designed to run locally or within a CI/CD system.
All inputs are passed via environment variables.
DISABLED or ENABLED. Defaults to DISABLED.To trigger a task
docker run -it --rm \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e AWS_DEFAULT_REGION="eu-west-2" \
-e CLUSTER="arn:aws:ecs:eu-west-2:123456789876:cluster/Testing" \
-e TASK_DEFINITION="hello-world:1" \
-e SUBNETS="subnet-2299fd4b,subnet-9ca056d0,subnet-5340e029" \
-e SECURITY_GROUPS="sg-4f97de25,sg-01b7f38dc1ef5d7cc" \
-e AWS_ROLE="arn:aws:iam::123456789876:role/admin-role" \
-e PUBLIC_IP="ENABLED" \
nsmithuk/ecs-task-runner:latest
This project is licensed under the MIT License - see the LICENSE file for details.
Content type
Image
Digest
Size
43.3 MB
Last updated
over 5 years ago
docker pull nsmithuk/ecs-task-runner