Skip to content

Instantly share code, notes, and snippets.

@mjaromi
Created September 23, 2020 11:30
Show Gist options
  • Save mjaromi/8a9b059d3056ef377a9e0e20d7482bc1 to your computer and use it in GitHub Desktop.
Save mjaromi/8a9b059d3056ef377a9e0e20d7482bc1 to your computer and use it in GitHub Desktop.
Show serviceName / desiredCount / minimum/maximumHealthyPercent for ECS services running on $ECS_CLUSTER_NAME cluster
aws ecs list-services --cluster $ECS_CLUSTER_NAME | jq -r '.serviceArns[]' | while read service ; do
aws ecs describe-services --services $service --cluster $ECS_CLUSTER_NAME | jq -r '.services[] | "\(.serviceName) - \(.desiredCount) - \(.deploymentConfiguration.minimumHealthyPercent),\(.deploymentConfiguration.maximumPercent)"'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment