How to Check Your Total AWS Bill Cost
Table of Contents
This tutorial shows how to get the total amount charged to your Amazon Web Services (AWS) account for a given time period. You can also use the command in conjunction with the
date command to quickly check your costs for the current month.
Step 1. Open AWS Cloud Shell
Open AWS Cloud Shell. The rest of the instructions on this page are for running inside Cloud Shell.
To get the total costs for any arbitrary time period (for which AWS still provides cost data), you can use the
aws ce get-cost-and-usage command. The example below provides the total cost for the time period January 1, 2021 to February 1, 2021.
You can replace the
End dates (format: Year-Month-Day) in the command above with the time period that you're interested in.
Start date is included in the time period. The
End date is excluded (i.e., the time period includes all dates prior to, but not including
End). Thus to get the total cost for a particular month, you should set the
End date to the first day of the next month.
The example command above provides the Unblended Cost, which is what most users will be interested in. However, the command can also provide the Blended Cost. You can find more information on Unblended vs. Blended Costs here.
A quick way to check the total cost for the current month including today is to use the UNIX
date command built into Cloud Shell:
- get-cost-and-usage — AWS CLI Command Reference
- Erin Carlson, "Understanding your AWS Cost Datasets: A Cheat Sheet." AWS Blog, November 22, 2019.