Reputation: 829
Suppose I upload a zero length object to S3 and then walk away. Will I be charged (monthly) for storing it, besides the initial put? Or is the metadata for that object "free".
Upvotes: 1
Views: 1103
Reputation: 65
No, you will not be charged for storage.
To test this I created a million empty objects in Standard storage inside an empty tagged bucket and then filter the S3 costs for that bucket using Cost Explorer - on the day when objects were created the "Requests-Tier1" cost was 5$ (which makes perfect sense since you pay 0.005$ per 1,000 requests) - but subsequent days the S3 cost for that bucket was 0.
Interestingly enough looking at the bucket in Metrics displays a non-zero "Total bucket size" of ~85MB - so at this scale the cost just rounds to zero anyway. Given that the cost of Standard storage is $0.023 per GB - to get billed 1 cent you have to have ~445MB worth of data - which is about 5 million objects. Then I crated another 5 million objects in the bucket, making the total number of objects 6 million and the bucket size at 491MB - but I still wasn't charge 1 cent, so I am pretty sure that empty objects are free.
Upvotes: 3
Reputation: 21
The Amazon documentation is not clear on this, but there are a few things that lead me to assume that zero-length objects accrue storage costs.
The volume of storage billed in a month is based on the average storage used throughout the month. This includes all object data and metadata stored in buckets that you created under your AWS account.
https://aws.amazon.com/s3/faqs/#Billing
There are two kinds of metadata in Amazon S3: system-defined metadata and user-defined metadata.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html
Delete markers accrue a nominal charge for storage in Amazon S3. The storage size of a delete marker is equal to the size of the key name of the delete marker. A key name is a sequence of Unicode characters. The UTF-8 encoding adds 1–4 bytes of storage to your bucket for each character in the name.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html
Upvotes: 1
Reputation: 12259
You will likely be changed for one PUT/POST request which is about $0.000005
Upvotes: 1