Start an ECS task without creating a service.
Section: Task Definitions and Tasks
Run a one-off task
bash
bash
aws ecs run-task --cluster my-cluster --task-definition my-app:12 --launch-type FARGATE --network-configuration 'awsvpcConfiguration={subnets=[subnet-0123456789abcdef0],securityGroups=[sg-0123456789abcdef0],assignPublicIp=ENABLED}'Explanation
Useful for batch jobs, one-offs, and manual diagnostics.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Task Definitions and Tasks