Skip to content

Instantly share code, notes, and snippets.

@z0ph
Last active December 16, 2021 21:09
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save z0ph/b3c65693727bda6fac3e7d5320b451b4 to your computer and use it in GitHub Desktop.
Find AWS CloudWatch LogGroups size + retention | sorted
aws logs describe-log-groups \
--query "logGroups[*].{LogGroup:logGroupName,VolumeSize:storedBytes,RetentionInDays:retentionInDays} | reverse(sort_by(@, &VolumeSize))" \
--output table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment