Skip to content

Instantly share code, notes, and snippets.

@mjaromi
Last active February 9, 2021 16:59
Show Gist options
  • Save mjaromi/98778b29aedae122366b916fd714ae92 to your computer and use it in GitHub Desktop.
Save mjaromi/98778b29aedae122366b916fd714ae92 to your computer and use it in GitHub Desktop.
Show name / memory / memoryReservation for every ECS taskDefinition
aws ecs list-task-definitions --status active | jq -r '.taskDefinitionArns[]' | cut -d'/' -f2 | while read taskDefinition; do
echo -ne "$taskDefinition - " ; aws ecs describe-task-definition --task-definition $taskDefinition | jq -r '.taskDefinition.containerDefinitions[] | "\(.name) - \(.memory) - \(.memoryReservation)"'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment