Skip to content

Instantly share code, notes, and snippets.

@chrisdpa-tvx
Created July 26, 2017 14:00
Show Gist options
  • Save chrisdpa-tvx/547aa23dee8b11df0776bac874b3e877 to your computer and use it in GitHub Desktop.
Save chrisdpa-tvx/547aa23dee8b11df0776bac874b3e877 to your computer and use it in GitHub Desktop.
Drill to docker image from a cluster
CLUSTER=$1
aws ecs list-services --cluster ${CLUSTER} | jq -r '.[] | .[]' | \
xargs -J % -n10 aws ecs describe-services --cluster ${CLUSTER} --services % | jq -r '.services[] | .serviceArn' | \
xargs -J % -n10 aws ecs describe-services --cluster ${CLUSTER} --services % | jq -r '.services[]|.taskDefinition' | \
xargs -J % -n1 aws ecs describe-task-definition --task-definition % | jq -r '.taskDefinition|.containerDefinitions[]|.image'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment