why AWS-bucket size shows different result with different methods ? | AWS-cloud-watch vs AWS Bucket metric dashboard

0

I used Aws-cloudwatch to get the size of bucket but the result is different from aws metric dashboard of bucket.

Ex. I uploaded some amount of data manually in bucket and check the size of bucket after some days but it showing different in api call and showing different on metric dashboard. I'm getting 99GB bucket size on metric dashboard but from api call it showing 120GB so it's weird, I'm not getting how this happend. And also how aws will charges us, is it based on the data size showing on metric dashboard or on based on the result fetched by cloudwatch api call.

cloudwatch cli command :

$  aws cloudwatch get-metric-statistics --namespace "AWS/S3" --start-time 2023-01-14 --end-time 2023-01-15 --metric-name BucketSizeBytes --period 3600 --statistics Average --unit Bytes --dimensions Name=BucketName,Value=MyBucketName  Name=StorageType,Value=StandardStorage
1 Answer
0

One possibility is that you have failed multipart uploads in your bucket and you are being charged for them. Here are two articles about multipart uploads that are stored in a bucket. Storage Lens will help you see if this is the case. Also, if you are being charged for this, open a support ticket with AWS to get those charges refunded to you. Be prepared to tell AWS how long you need them to look for these charges.

https://aws.amazon.com/blogs/aws-cloud-financial-management/discovering-and-deleting-incomplete-multipart-uploads-to-lower-amazon-s3-costs/

https://aws.amazon.com/blogs/aws/s3-lifecycle-management-update-support-for-multipart-uploads-and-delete-markers/

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions