Retrieve CloudFront data transfer volume and request count for each member account in CSV format using Cost Explorer in the AWS Organizations management account
Good evening, this is Chiba (Yuki).
This time, I'm assuming quite a specific scenario as follows:
- Multiple member accounts exist under AWS Organizations
- Want to check the following usage for each member account:
- Amazon CloudFront outbound data transfer volume
- Amazon CloudFront request count
- Want to obtain the above information collectively from the AWS Organizations management account (parent account)
I'll introduce a method to achieve the above by properly filtering in the management account's Cost Explorer and downloading in CSV format.
Here I'm specifically focusing on Amazon CloudFront, but I think this approach can be used in other cases by changing the service specified in the filtering.
Summary
Specify the following in the report parameters and filtering conditions of the management account's Cost Explorer.
- When you want to obtain Amazon CloudFront outbound data transfer volume:
Date Range | Dimension | Service | Usage Type |
---|---|---|---|
Any | Linked Account | CloudFront | Select all that include DataTransfer-Out-Bytes |
- When you want to obtain Amazon CloudFront request count:
Date Range | Dimension | Service | Usage Type |
---|---|---|---|
Any | Linked Account | CloudFront | Select all that include Requests-Tier |
Let's take a look at the actual operation screen.
Sign in to the AWS Management Console of the management account and navigate to the Cost Explorer screen. (This assumes that the IAM user or role you are using has the appropriate permissions.)
On the right side of the screen, you'll find report parameters where you can configure various settings.
- Date Range: Specify according to your requirements
- By default, you can go back up to 14 months
- Dimension: Select "Linked Account"
- This will allow you to get a breakdown at the level of each member account
- Service: Select "CloudFront"
- If you need information about a different service, change this accordingly
Usage Type represents the type of cost breakdown. Enter the following depending on what information you want to retrieve:
- For data transfer volume: DataTransfer-Out-Bytes
- For number of requests: Requests-Tier
👇When you enter text, suggestions containing that text will appear. You can select all items by checking "Select All". Don't forget to click "Apply".
Once you've finished setting the report parameters, a graph should be displayed in the center of the screen according to your settings. If you scroll down, you'll find a section called "Cost and Usage Breakdown" with a detailed list.
👆In the example screen, since we are filtering for usage types containing "DataTransfer-Out-Bytes", it shows information on "Usage (GB)" and "Cost (USD)" for each member account.
By clicking "Download as CSV", you can download the breakdown as a file named cost.csv
.## Contents of the Output CSV
The CSV downloaded is structured as follows (significantly simplified):
Linked Account,111111111111,222222222222,333333333333,,111111111111,222222222222,333333333333,
Linked Account Name,Account A($),Account B ($),Account C($),Total Cost ($),Account A(GB),Account B (GB),Account C (GB),Total Usage (GB)
Linked Account Total,0,0,0,0,0.0005515476,0.0094913738,0.0149771621,46.94771573
2025-02-01,0,0,0,0,0.0000039506,0.0094913738,0.0066980987,12.05705269
2025-03-01,0,,0,0,0.0000013728,,0.0023707833,24.11085099
2025-04-01,0,,0,0,0.0001229323,,0.0015171236,7.946746693
2025-05-01,0,,0,0,0.0001342376,,0.0019810737,0.8573239165
2025-06-01,0,,0,0,0.0001311102,,0.0004181848,0.6342241074
2025-07-01,0,,0,0,0.0001579441,,0.001991898,1.341517334
The structure looks like this:
- Cost columns for each account
- Usage columns for each account
Since I've removed columns from the actual data for this sample, the usage totals don't match, but please forgive that
👆In the example above, we're filtering by "DataTransfer-Out-Bytes" so the usage is in "(GB)", but when filtering by "Requests-Tier", it would be in "(Requests)".
If you only need the usage data, you can process this information as needed. I often prefer to have the months as columns, so I transpose the data when pasting.
Image showing only the usage-related portion copied and transposed
Conclusion
This article was about retrieving CloudFront data transfer volume and request counts by member account in CSV format from Cost Explorer in the AWS Organizations management account.
This approach is particularly useful when you want to retrieve specific metrics across multiple member accounts at once. By changing the filtering conditions, you can adapt this method for other use cases as well.
This has been Chiba Yuki (@batchicchi).