Created
January 4, 2018 11:17
-
-
Save jamieparkinson/abb65c2b82fa4198b0e2f0595d1d1cef to your computer and use it in GitHub Desktop.
Run one task per host from CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nInstances=$(aws ecs list-container-instances --cluster ${CLUSTER_NAME} | jq -r '.containerInstanceArns | length') | |
aws ecs run-task \ | |
--cluster ${CLUSTER_NAME} \ | |
--task-definition ${TASK_NAME} \ | |
--count ${nInstances} \ | |
--placement-constraints type="distinctInstance" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment