Skip to content

Instantly share code, notes, and snippets.

@drohr
Created December 9, 2015 06:38
Show Gist options
  • Select an option

  • Save drohr/76d99a80b919285a3d14 to your computer and use it in GitHub Desktop.

Select an option

Save drohr/76d99a80b919285a3d14 to your computer and use it in GitHub Desktop.
calculate bucket size
#!/bin/sh
BUCKET=$1
aws cloudwatch get-metric-statistics --namespace AWS/S3 --start-time 2015-12-07T10:00:00 --end-time 2015-12-08T01:00:00 --period 86400 --statistics Average --region eu-west-1 --metric-name BucketSizeBytes --dimensions Name=BucketName,Value=$BUCKET Name=StorageType,Value=StandardStorage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment