DEV Community

Cover image for Where does your S3 bill actually come from?
ANSHUL VAIBHAV
ANSHUL VAIBHAV

Posted on Edited on

Where does your S3 bill actually come from?

Editorial illustration of the Buckets app icon with copper trim and three orange cubes

I opened a test bucket and saw 613.87 MB of S3 Standard storage and 10,272 objects. Then I opened Cost Explorer and saw $0.21. Most of the visible spend came from requests, and it was for the whole account. The bucket's storage panel couldn't tell me how much of that total belonged to the bucket I had open.

I was testing the Cost Explorer view (TC-COST-001) and the bucket metrics and Storage Lens panels (TC-MET-001) in Buckets by Serverless Creed. My first attempt to load spending data ended with an IAM error.

First, get the billing view to load

The first time I opened Cost Explorer, Buckets displayed Cost Explorer access denied and identified ce:GetCostAndUsage as missing. Listing a bucket and querying billing data require different permissions. After the permission issue was resolved, the view loaded. I don't have the exact IAM policy diff, so I can't say who changed it or which permissions were updated. For a role that needs the spend view, I'd start by checking Cost Explorer is enabled for the account and that the role can call the specific cost read operation. Tag discovery, if needed, is a separate action. What is AWS Cost Explorer? · GetCostAndUsage

Buckets displays Cost Explorer access denied and identifies ce:GetCostAndUsage as missing

TC-COST-001. With the billing API denied, Buckets surfaced the specific missing action.

Monthly totals first, usage types second

The restored view showed a six-month window from June through November 2026, with November still in progress at capture. The period total shown was $0.21, and November also displayed $0.21. June through October each displayed $0.00 at the UI's precision. Switching the same period to Daily left the displayed period total at $0.21. Some early daily entries even showed −$0.00. I'd need the source amounts to tell what was behind those rounded values. Daily granularity is useful for locating changes in the timeline. Monthly granularity makes an incomplete month easier to compare with prior periods, provided the date cutoff is clear.

The recovered monthly Cost Explorer view shows a 0.21 dollar period total and 0.21 dollars for November 2026

TC-COST-001. Account-wide Amazon S3 spend for the displayed window, including November month to date.

Cost Explorer's GetCostAndUsage API can group by the USAGE_TYPE dimension. Buckets identified the figures as UnblendedCost. In the latest-month breakdown, the largest visible line was Requests-Tier1 at $0.20, followed by Requests-Tier2 at $0.01. Several smaller lines displayed $0.00. Those rounded amounts don't establish that all other activity was free, and the grouped labels alone don't tell me which application or bucket initiated a request. I also kept the app's separate forecast out of this comparison. If I were comparing these amounts with an invoice, I would align both the reporting dates and the cost metric first and save the cutoff date alongside the exported report. Cost Explorer dimensions and cost metrics

Latest-month usage types show Requests-Tier1 at 0.20 dollars and Requests-Tier2 at 0.01 dollars, with a no-active-tags notice

TC-COST-001. Request usage types accounted for the visible spend. The selected bucket had no available tag-based attribution in this view.

An S3 bill can contain storage by storage class and time, API requests, data retrieval from applicable classes, and applicable transfer charges. The pricing depends on region, storage class and operation. For example, downloading data from an infrequent-access class can introduce retrieval charges as well as request costs. I'd look up the regional price after identifying the billed usage type. I'd also treat Cost Explorer data as potentially delayed or estimated for recent dates. The API surfaces an estimated flag, and AWS refreshes Cost Explorer data at least once every 24 hours, with some updates arriving later. Amazon S3 pricing · Cost Explorer data availability

Bucket metrics explain activity and scale

On the selected bucket's metrics tab, Buckets displayed 613.87 MB for the daily average BucketSizeBytes with S3 Standard selected. The same panel displayed 10,272 for NumberOfObjects across storage types. I kept the MB label as displayed. These are daily CloudWatch storage metrics. For general-purpose buckets, the S3 object count includes current and noncurrent objects, delete markers, and incomplete multipart upload parts. That can make it differ from the number of keys returned by a live object listing. S3 CloudWatch metric definitions

CloudWatch metrics show 613.87 MB of S3 Standard storage, 10,272 objects and zero request metrics configurations

TC-MET-001. The selected bucket had daily storage metrics and no request metrics configurations.

Buckets had no request metrics configuration for this bucket. That explained the empty request-metrics view. S3's CloudWatch request metrics require a configuration and are delivered on a best-effort basis. They can help correlate activity with a billing change when available. The charge itself comes from billing data. S3 CloudWatch metric definitions

What zero datapoints means

In the Storage Lens panel, the default dashboard was selected and looked enabled. The last-14-days view showed 0 points and no data yet. Storage Lens reports daily analytics, and its scope and publishing configuration matter. CloudWatch publishing for Storage Lens requires advanced metrics and the publishing option. I didn't establish the cause of the empty series in Buckets. The panel established only that this view had no datapoints to display. S3 Storage Lens

Selected Storage Lens dashboard shows no latest storage value and zero points in the last 14 days

TC-MET-001. The Storage Lens series was empty during the observation.

Three visibility paths from S3 usage to billing and Cost Explorer, bucket CloudWatch metrics, and Storage Lens analytics

Illustration. Billing, CloudWatch and Storage Lens answer different questions about S3.

If this were a bigger bill, I'd start with the dates and usage types that moved, then use CloudWatch or Storage Lens to check whether the activity changed around the same time. Bucket attribution requires a suitable billing dimension, such as a unique bucket tag activated for cost allocation where those charges support it. Buckets reported no active cost allocation tags during this test. I could point to the request lines for the account, but I couldn't assign that $0.21 to the bucket whose size I had measured. S3 bucket cost allocation tags

Top comments (0)