Skip to content

Instantly share code, notes, and snippets.

@amosshapira
Created November 20, 2015 05:22
Show Gist options
  • Select an option

  • Save amosshapira/1f3633aa877ff1f197f6 to your computer and use it in GitHub Desktop.

Select an option

Save amosshapira/1f3633aa877ff1f197f6 to your computer and use it in GitHub Desktop.
Calculate total space (in GB) used by RDS snapshots in a given region. AWS does NOT charge for storage of snapshots up to the total size of the primary DB as long as the RDS instance is running. Ref about pricing: https://aws.amazon.com/rds/pricing/
aws rds describe-db-snapshots --region=us-east-1 | \
jq '.DBSnapshots | .[] | .AllocatedStorage' | \
awk '{s+=$1}END{print s}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment