

# Analyzing your costs and usage with AWS Cost Explorer


AWS Cost Explorer is a tool that enables you to view and analyze your costs and usage. You can explore your usage and costs using the main graph, the Cost Explorer cost and usage reports, or the Cost Explorer RI reports. You can also ask questions about your costs using suggested prompts or the **Ask question** button to ask in your own words, and receive detailed insights in **Amazon Q Developer** while Cost Explorer automatically updates its charts, tables, and report parameters including filters, groupings, and dates to reflect the analysis. You can view data for up to the last 13 months, forecast how much you're likely to spend for the next 18 months, and get recommendations for what Reserved Instances to purchase. You can use Cost Explorer to identify areas that need further inquiry and see trends that you can use to understand your costs.

You can view your costs and usage using the Cost Explorer user interface free of charge. You can also access your data programmatically using the Cost Explorer API. Each paginated API request incurs a charge of \$10.01. You can't disable Cost Explorer after you enable it.

In addition, Cost Explorer provides preconfigured views that display at-a-glance information about your cost trends and give you a head start on customizing views that suit your needs. 

When you first sign up for Cost Explorer, AWS prepares the data about your costs for the current month and the last 13 months, and then calculates the forecast for the next 18 months. The current month's data is available for viewing in about 24 hours. The rest of your data takes a few days longer. Cost Explorer refreshes your cost data at least once every 24 hours. However, this depends on your upstream data from your billing applications, and some data might be updated later than 24 hours. After you sign up, Cost Explorer by default can display up to 13 months of historical data (if you have that much), the current month, and the forecasted costs for the next 18 months. The first time that you use Cost Explorer, Cost Explorer walks you through the main parts of the console with an explanation for each section.

Cost Explorer uses the same dataset that is used to generate the AWS Cost and Usage Reports and the detailed billing reports. For a comprehensive review of the data, you can download it into a comma-separated value (CSV) file.

**Topics**
+ [

# Enabling Cost Explorer
](ce-enable.md)
+ [

# Getting started with Cost Explorer
](ce-getting-started.md)
+ [

# Exploring your data using Cost Explorer
](ce-exploring-data.md)
+ [

# Asking questions about your costs using Amazon Q Developer
](ce-nlq.md)
+ [

# Comparing your costs between time periods
](ce-cost-comparison.md)
+ [

# Exploring more data for advanced cost analysis
](ce-advanced-cost-analysis.md)
+ [

# Using the AWS Cost Explorer API
](ce-api.md)

# Enabling Cost Explorer


You can enable Cost Explorer for your account by opening Cost Explorer for the first time in the AWS Cost Management console. You can't enable Cost Explorer using the API. After you enable Cost Explorer, AWS prepares the data about your costs for the current month and the previous 13 months, and then calculates the forecast for the next 12 months. The current month's data is available for viewing in about 24 hours. The rest of your data takes a few days longer. Cost Explorer updates your cost data at least once every 24 hours.

As part of the process of enabling Cost Explorer, AWS automatically configures Cost Anomaly Detection for your account. Cost Anomaly Detection is an AWS Cost Management feature. This feature uses machine learning models to detect and alert on anomalous spend patterns in your deployed AWS services. To get you started with Cost Anomaly Detection, AWS sets up an AWS services monitor and a daily summary alert subscription. You're alerted about any anomalous spend that exceeds \$1100 and 40% of your expected spend across the majority of your AWS services in your accounts. For more information, see [limitations](https://docs.aws.amazon.com/cost-management/latest/userguide/management-limits.html) and [Detecting unusual spend with AWS Cost Anomaly Detection](https://docs.aws.amazon.com/cost-management/latest/userguide/manage-ad.html).

**Note**  
You can opt out of Cost Anomaly Detection at any time. For more information, see [Opting out of Cost Anomaly Detection](https://docs.aws.amazon.com/cost-management/latest/userguide/opting-out-cad.html).

You can launch Cost Explorer if your account is a member account in an organization where the management account enabled Cost Explorer. Know that your organization's management account can also deny your account access. For more information, see [Consolidated billing for AWS Organizations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html).

**Note**  
An account’s status within an organization determines what cost and usage data are visible:  
A standalone account joins an organization. After this, the account can no longer access cost and usage data from when the account was a standalone account.
A member account leaves an organization to become a standalone account. After this, the account can no longer access cost and usage data from when the account was a member of the organization. The account can access only the data that's generated as a standalone account.
A member account leaves organization A to join organization B. After this, the account can no longer access cost and usage data from when the account was a member of organization A. The account can access only the data that's generated as a member of organization B.
An account rejoins an organization that the account previously belonged to. After this, the account regains access to its historical cost and usage data.

Signing up to receive the AWS Cost and Usage Reports or the Detailed Billing Report doesn't automatically enable Cost Explorer. To do so, follow this procedure.

**To sign up for Cost Explorer**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Cost Explorer**.

1. On the **Welcome to Cost Explorer** page, choose **Launch Cost Explorer**. 

For more information about controlling access to Cost Explorer, see [Controlling access to Cost Explorer](ce-access.md). 

# Controlling access to Cost Explorer


You can manage access to your Cost Explorer in the following ways:
+ Using the management account, you can enable Cost Explorer as a root user, automatically enabling all member accounts.
+ After member accounts are enabled, you can change Cost Explorer settings from within the management account. You can control the information that can be accessed in Cost Explorer. This includes costs, refunds or credits, discounts, and Reserved Instance (RI) recommendations.
+ After you enable Cost Explorer at the management account level, you can manage user IAM policies. For example, you can grant users full access or deny users access to Cost Explorer.

This topic provides information about how to control access in Cost Explorer.

For information about managing access to Billing and Cost Management pages, see [Overview of managing access permissions](control-access-billing.md). 

To reference Cost Explorer IAM policies, see [Using identity-based policies (IAM policies) for AWS Cost Management](billing-permissions-ref.md).

For more information about consolidated billing, see [Consolidated billing for AWS Organizations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html).

**Topics**
+ [

## Granting Cost Explorer access
](#grant-ce-access)
+ [

## Controlling access using Cost Explorer preferences
](#ce-controlling-access)
+ [

## Managing Cost Explorer access for users
](#ce-iam-users)

## Granting Cost Explorer access


If you're signed into the management account with your root account credentials, you can enable Cost Explorer access. Your root account credentials are through the Billing and Cost Management console. Enabling Cost Explorer at the management account level enables Cost Explorer for all of your organization accounts. All accounts in the organization are granted access, and you can't grant or deny access individually.

## Controlling access using Cost Explorer preferences


A management account can grant access to Cost Explorer for all or none of the member accounts. Access isn’t customizable for each individual member account.

The management account in AWS Organizations has full access to all Billing and Cost Management information for costs incurred by both the management account and member accounts. Member accounts only have access to their own cost and usage data in Cost Explorer.

By default, the management account in AWS Organizations sees all costs at the chargeable rate. If an organization is onboarded to Billing Conductor, the management account also sees costs at the proforma rate. The Cost Explorer view for member accounts depends on the configuration in Billing Conductor.

The owner of a management account can do the following:
+ View all costs in Cost Explorer.
+ Grant all member accounts the permission to see the costs for their own member account, refunds, credits, and RI recommendations.

Member account owners can't see costs, refunds, and RI recommendations for other accounts in the Organizations. For more information about consolidated billing, see [Consolidated billing for AWS Organizations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html).

If you're an AWS account owner and not using consolidated billing, you have full access to all Billing and Cost Management information including Cost Explorer.

If you're onboarded to Billing Conductor, the Cost Explorer view for member accounts depends on whether a member account is part of a billing group.

If a member account is part of a billing group:
+ The member account sees all costs at the proforma rate.
+ Cost Explorer preferences, such as **Linked Account Access**, **Linked Account Refunds and Credits**, **Linked Account Discounts**, **Hourly and Resource Level Data**, and **Split cost allocation data** are not applicable to the member account.

If a member account is not part of a billing group:
+ The member account see costs at the chargeable rate.
+ Cost Explorer preferences apply to the member account.

For more information about Billing Conductor, see the [Billing Conductor User Guide](https://docs.aws.amazon.com/billingconductor/latest/userguide/what-is-billingconductor.html).

### Organizations account status use cases


An account’s status within an organization determines what cost and usage data are visible in the following ways:
+ A standalone account joins an organization. After this, the account can no longer access cost and usage data from when the account was a standalone account.
+ A member account leaves an organization to become a standalone account. After this, the account can no longer access cost and usage data from when the account was a member of their previous organization. The account can only access the data that's generated as a standalone account.
+ A member account leaves organization A to join organization B. After this, the account can no longer access cost and usage data from organization A. The account can access only the data that's generated as a member of organization B.
+ An account rejoins an organization that it previously belonged to. After this, the account regains access to its historical cost and usage data.

### Controlling member accounts’ access using Cost Explorer preferences


You can grant or restrict the access to all member accounts in your Organizations. When you enable your account at the management account level, all member accounts are granted access to their cost and usage data by default.<a name="control-members-access"></a>

**To control member account access to Cost Explorer data**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Cost Management Preferences**.

1. On the **Preferences** page, under **Member account permissions** in the **General** tab, select or clear **Linked account access**.

1. Choose **Save preferences**.

## Managing Cost Explorer access for users


After you enable Cost Explorer at the management account level, you can use IAM to manage access to your billing data for individual users. This way, you can grant or revoke access on an individual level for each account, rather than granting access to all member accounts.

A user must be granted explicit permissions to view pages in the Billing and Cost Management console. With the appropriate permissions, the user can view costs for the AWS account that the user belongs to. For the policy that grants the necessary permissions to a user, see [Overview of managing access permissions](control-access-billing.md). 

# Getting started with Cost Explorer


After you enable Cost Explorer, you can launch it from the AWS Cost Management console.<a name="ce-start"></a>

**To open Cost Explorer**
+ Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

This opens the Cost dashboard that shows you the following:
+ Your estimated costs for the month to date
+ Your forecasted costs for the month
+ A graph of your daily costs
+ Your five top cost trends
+ A list of reports that you recently viewed
+ Suggested prompts for one-click analysis of your cost questions, powered by **Amazon Q Developer**
+ An **Ask question** button for typing custom cost questions in your own words, powered by **Amazon Q Developer**

# Exploring your data using Cost Explorer


On the Cost Explorer dashboard, Cost Explorer shows your estimated costs for the month to date, your forecasted costs for the month, a graph of your daily costs, your five top cost trends, and a list of reports that you recently viewed. 

All costs reflect your usage up to the previous day. For example, if today is December 2, the data includes your usage through December 1.

**Note**  
In the current billing period, the data depends on your upstream data from your billing applications, and some data might be updated later than 24 hours.
+ [Your Cost Explorer costs](#ce-costs)
+ [Your Cost Explorer trends](#ce-trends)
+ [Your daily unblended costs](#ce-graph)
+ [Your monthly unblended costs](#ce-monthly-unblended)
+ [Your net unblended costs](#net-unblended)
+ [Your recent Cost Explorer reports](#ce-recent-reports)
+ [Your amortized costs](#amortized-costs)
+ [Your net amortized costs](#net-amortized-costs)

## Navigating Cost Explorer


You can use the icons in the left pane to do the following:
+ Go to the main Cost Explorer dashboard
+ See a list of the default Cost Explorer reports
+ See a list of your saved reports
+ See information about your reservations
+ See your reservation recommendations

## Your Cost Explorer costs


At the top of the **Cost Explorer** page are the **Month-to-date costs** and **Forecasted month end costs**. The **Month-to-date costs** shows how much you're estimated to have incurred in charges so far this month and compares it to this time last month. The **Forecasted month end costs** shows how much Cost Explorer estimates that you will owe at the end of the month and compares your estimated costs to your actual costs of the previous month. The **Month-to-date costs** and the **Forecasted month end costs** don't include refunds.

The costs for Cost Explorer are only shown in US dollars.

## Your Cost Explorer trends


In the ***this month* trends** section, Cost Explorer shows your top cost trends. For example, your costs related to a specific service have gone up, or your costs from a specific type of RI have gone up. To see all of your costs trends, choose **View all trends** in the upper-right corner of the trend section.

To understand a trend in more depth, choose it. You're taken to a Cost Explorer chart that shows the costs that went into calculating that trend.

## Your daily unblended costs


In the center of the Cost Explorer dashboard, Cost Explorer shows a graph of your current unblended daily costs. You can access the filters and parameters used to create the graph by choosing **Explore costs** in the upper-right corner. That takes you to the Cost Explorer report page, enabling you to access the default Cost Explorer reports and modify the parameters used to create the chart. The Cost Explorer reports offer additional functionality such as downloading your data as a CSV file and saving your specific parameters as a report. For more information, see [Understanding your costs using Cost Explorer reports](ce-reports.md). Your daily unblended costs don't include refunds.

## Your monthly unblended costs


### Monthly granularity


You can view your unblended costs at the monthly granularity and see the discounts applied to your monthly bill. When forecasting costs, discounts are included by default. To view your unblended costs, open the Cost Explorer page and choose **Cost Explorer** from the navigation pane. Discounts appear as the **RI Volume Discount** in the chart. The discount amount aligns with the discount amount shown in your Billing and Cost Management console.<a name="see-details-in-BCM"></a>

**To see the details in your Billing and Cost Management console**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Bills**.

1. To display the discount, select the arrow next to **Total Discounts**, under **Credits, Total Discounts and Tax Invoices**.

#### Monthly gross charges


You can view your gross monthly charges by excluding the **RI Volume Discount**. <a name="exclude"></a>

**To exclude RI volume discounts in your monthly view**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the left pane, choose **Cost Explorer**.

1. Choose **Cost & Usage**.

1. On the **Filters** pane, choose **Charge Type**.

1. Select **RI Volume Discount**.

1. To open a dropdown, select **Include only** and choose **Exclude only**.

1. Select **Apply filters**.

## Your net unblended costs


This enables you to see your net costs after all applicable discounts are calculated. You should still exclude any manual adjustment such as refunds and credits as a best practice. **RI Volume Discounts** are no longer visible because these are post-discount amounts.

## Your recent Cost Explorer reports


At the bottom of the Cost Explorer dashboard is a list of reports that you have accessed recently, when you accessed them, and a link back to the report. This enables you to switch between reports or remember the reports that you find most useful.

For more information about Cost Explorer reports, see [Understanding your costs using Cost Explorer reports](ce-reports.md).

## Your amortized costs


This enables you to see the cost of your AWS commitments, such as Amazon EC2 Reserved Instances or Savings Plans, spread across the usage of the selection period. AWS estimates your amortized costs by combining the unblended upfront and recurring reservation fees, and calculates the effective rate over the period of time that the upfront or recurring fee applies. In the daily view, Cost Explorer shows the unused portion of your commitment fees at the first of the month or the date of purchase.

## Your net amortized costs


This enables you to see the cost of your AWS commitments, such as Amazon EC2 Reserved Instances or Savings Plans, after discounts with the additional logic that shows how the actual cost applies over time. Since Savings Plans and Reserved Instances usually have upfront or recurring monthly fees associated with them, the net amortized cost dataset reveals the true cost by showing how post-discount fees amortize over the period of time that the upfront or recurring fee applies.

# Using the Cost Explorer chart


By default, you can view your costs at the chargeable rate as either a cash-based view with unblended costs or as an accrual-based view. In a cash-based view, your costs are recorded when cash is received or paid. In an accrual-based view, your costs are recorded when income is earned or costs are incurred. You can view data for up to the last 13 months, the current month, and forecast how much you're likely to spend for the next 12 months. You can also specify time ranges for the data and view time data by day or by month.

By default, Cost Explorer uses the **Group by** filter for the **Daily unblended costs** graph. When using the **Group by** filter, the Cost Explorer chart displays data for up to ten values in the **Group by** filter. If your data contains additional values, the chart displays nine bars or lines and then aggregates all remaining items in a tenth. The data table that's below the chart breaks out the data for individual services that are aggregated in the chart.

If your organization is onboarded to Billing Conductor, member accounts placed in billing groups automatically see your costs in Cost Explorer at the proforma rate configured in Billing Conductor. Member accounts can view costs and usage starting from when they joined their current billing group, and will lose access to the chargeable data for the period prior to joining their current billing group. If a backfill of proforma billing data is needed, submit a support ticket requesting a proforma backfill from the Billing Conductor team.

For more information about proforma rate configurations, see the [Billing Conductor User Guide](https://docs.aws.amazon.com/billingconductor/latest/userguide/what-is-billingconductor.html).

**Topics**
+ [

# Modifying your chart
](ce-modify.md)
+ [

# Reading the Cost Explorer data table
](ce-table.md)
+ [

# Forecasting with Cost Explorer
](ce-forecast.md)

# Modifying your chart


You can modify the parameters that Cost Explorer uses to create your chart to explore different sets of data.
+ [Selecting a style for your chart](#ce-style)
+ [Choosing time ranges for the data that you want to view](#ce-timerange)
+ [Grouping data by filter type](#ce-group)
+ [Filtering the data that you want to view](ce-filtering.md)
+ [Choosing advanced options](ce-advanced.md)

## Selecting a style for your chart


Cost Explorer provides three styles for charting your cost data: 
+ Bar charts (**Bar**)
+ Stacked bar charts (**Stack**)
+ Line graphs (**Line**)

You can set the style by choosing one of the views on the top right corner of the chart.

## Choosing time ranges for the data that you want to view


You can choose to view your cost data in monthly or daily *levels of granularity*. You can use preconfigured time ranges or set custom start and end dates. 

**To set the granularity and time range for your data**

1. Start Cost Explorer.

1. Choose a time granularity of **Daily**, **Monthly**, or **Hourly**.
**Note**  
To enable hourly granularity, opt in through the Cost Explorer console **Preferences** page as the management account. When hourly granularity is enabled, information is available for the previous 14 days.

1. For your monthly or daily data, open the calendar and define a custom time range for your report. Or, alternatively, choose a preconfigured time range (**Auto-select**) using the dropdowns shown below the calendar. You can choose from a number of historical or forecast time ranges. The name of the time range that you choose appears in the calendar.

   Hourly granularity is not available for billing transfer (showback/ chargeback views and billing group views).

1. Choose **Apply**.

### Historical time range options


In Cost Explorer, months are defined as calendar months. Days are defined as 12:00:00 AM to 11:59:59 PM. Based on these definitions, when you choose **Last 3 Months** for a date range, you see cost data for the 3 previous months. This doesn't include the present month. For example, if you view your chart on June 6, 2017, and select **Last 3 Months**, your chart includes data for March, April, and May 2017. All times are in Universal Coordinated Time (UTC). 

You can choose time ranges for both your past costs and your forecasted future costs.

The following list defines each time range option for your past costs in Cost Explorer. 
+ Custom

  Displays data for the **From** and **To** time range that you specify with calendar controls.
+ 1D (Last 1 Day)

  Displays cost data from the previous day.
+ 7D (Last 7 Days)

  Displays cost data from the day before and the previous 6 days. 
+ Current Month

  Displays cost data and forecast data for the current month.
+ 3M (Last 3 Months)

  Includes cost data from the previous 3 months but doesn't include the current month.
+ 6M (Last 6 Months)

  Includes cost data from the previous 6 months but doesn't include the current month.
+ 1Y (Last 12 Months)

  Includes cost data from the previous 12 months but doesn't include the current month.
+ MTD (Month to Date)

  Displays cost data from the current calendar month. 
+ YTD (Year to Date)

  Displays cost data from the current calendar year.

### Forecast time range options


With the **Daily** or **Monthly** time granularity, you have the option to view forecast costs in Cost Explorer. The following list defines each time range option for your forecast data. You can select a **Historical** time range and a **Forecasted** time range to display together. For example, you can select a **Historical** time range of 3 months (3M) and select a **Forecasted** time range of 3 months (\$13M). Your report includes historical data for the previous 3 months plus forecasted data for the next 3 months. To clear a **Historical** time range and see only the forecast, choose the **Historical** time range option again. 

**Note**  
If you choose any forecasted dates, your current date’s cost and usage data shows as **Forecast**. The current date’s cost and usage won't include historical data. 
+ Custom

  Displays forecast data for the **From** and **To** time range that you specify with calendar controls.
+ \$11M

  Displays forecast data for the next month. This option is available if you choose the **Daily** time granularity.
+ \$13M

  Displays forecast data for the next 3 months. This option is available if you choose the **Daily** or **Monthly** time granularity.
+ \$118M

  Displays forecast data for the next 18 months. This option is available if you choose the Monthly time granularity.

## Grouping data by filter type


Use the **Group by** button to have Cost Explorer display the cost data groups by filter type. By default, Cost Explorer doesn't use grouping. Forecasting isn't available for charts that have grouping. If you don't select a **Group by** option, Cost Explorer displays total costs for the specified date range. 

**To group your data by filter type**

1. Launch Cost Explorer.

1. (Optional) Use the **Filters** controls to configure a view of your cost data.

1. Choose a **Group by** option to group by the category that you want. The data table below the chart also groups your cost figures by the category that you select.

# Filtering the data that you want to view
Filtering data

With Cost Explorer, you can filter how you view your AWS costs by one or more of the following values:
+ **API operation**
+ **Availability Zone (AZ)**
+ **Billing entity**
+ **Charge type**
+ **Include all**
+ **Instance type**
+ **Legal entity**
+ **Linked account**
+ **Platform**
+ **Purchase option**
+ **Region**
+ **Resources**
+ **Service**
+ **Tag**
+ **Tenancy**
+ **Usage type**
+ **Usage type group**

You can use Cost Explorer to see which service you use the most, which Availability Zone (AZ) most of your traffic is in, and which member account uses AWS the most. You can also apply multiple filters to look at intersecting datasets. For example, you can use the **Linked Account** and **Services** filters to identify the member account that spent the most money on Amazon EC2. 

**To filter your data**

1. Open Cost Explorer.

1. For **Filters**, choose a value. After you make a selection, a new control appears with additional options.

1. In the new control, select the items from each list that you want to display in the chart. Or, start typing in the search box to have Cost Explorer autocomplete your selection. After you choose your filters, choose **Apply filters**.
**Note**  
Each time that you apply filters to your costs, Cost Explorer creates a new chart. However, you can use your browser's bookmark feature to [save configuration settings](ce-bookmarks.md) for repeated use. Forecasts aren't saved, and Cost Explorer displays the most recent forecast when you revisit your saved chart.

You can continue refining your cost analysis by using multiple filters, grouping your data by filter type, and choosing **Advanced Options** tab options. 

## Combining filters to show data in common


Cost Explorer displays a chart that represents the data in common to all the filters that you have selected. You can use this view to analyze subsets of cost data. For example, assume that you set the **Service** filter to show costs that are related to Amazon EC2 and Amazon RDS services and then select **Reserved** using the **** filter. The cost chart will show how much money **Reserved** instances on Amazon EC2 and Amazon RDS cost for each of the three months.

**Note**  
AWS Cost and Usage Reports in Cost Explorer can use a maximum of 1024 filters.
You can filter RI Utilization reports by only one service at a time. You can do this only for the following services:  
Amazon EC2
Amazon Redshift
Amazon RDS
ElastiCache
OpenSearch Service

## Filters and logical operations (AND/OR)


When you select multiple filters and multiple values for each filter, Cost Explorer applies rules that emulate the logical AND and OR operators to your selections. Within each filter, Cost Explorer emulates the logical OR filter to your selection of filter types. This means that the resulting chart adds the aggregate costs for each item together. Using the previous example, you see bars for both of the selected services, Amazon EC2 and Amazon RDS. 

When you select multiple filters, Cost Explorer applies the logical AND operator to your selections. For a more concrete example, assume that you use the **Services** filter and specify Amazon EC2 and Amazon RDS costs for inclusion and then also apply the **Purchase Options** filter to select a single type of purchase option. You will see *only* the **Non-Reserved** charges incurred by Amazon EC2 and Amazon RDS. 

## Filter and group options


In Cost Explorer, you can filter by the following groups:

**API operation**  
Requests made to and tasks performed by a service, such as write and get requests to Amazon S3.

**Availability Zone**  
Distinct locations within a Region that are insulated from failures in other Availability Zones. They provide inexpensive, low-latency network connectivity to other Availability Zones in the same Region. 

**Billing entity**  
Helps you identify whether your invoices or transactions are for AWS Marketplace or for purchases of other AWS services. Possible values include:  
+ AWS: Identifies a transaction for AWS services other than in AWS Marketplace.
+ AWS Marketplace: Identifies a purchase in AWS Marketplace.

**Charge type**  
Different types of charges or fees.  
+ **Credit**: Any AWS credits that are applied to your account.
+ **Other out-of-cycle charges**: Any subscription charges that aren't upfront reservation charges or support charges.
+ **Recurring reservation fee**: Any recurring charges to your account. When you purchase a Partial Upfront or No Upfront Reserved Instance from AWS, you pay a recurring charge in exchange for a lower rate for using the instance. The recurring fees can result in spikes on the first day of every month, when AWS charges your account.
+ **Refund**: Any refunds that you received. Refunds are listed as a separate line item in the data table. They don't appear as an item in the chart because they represent a negative value in the calculation of your costs. The chart displays only positive values.
+ **Reservation applied usage**: Usage that AWS applied reservation discounts to.
+ **Savings Plan covered usage**: Any on-demand cost that's covered by your Savings Plan. In an Unblended costs view, this represents the covered usage at on-demand rates. In an Amortized costs view, this represents the covered usage at your Savings Plan rates. Savings Plan covered usage line items are offset by the corresponding Savings Plan negation items.
+ **Savings Plan negation**: Any offset cost through your Savings Plan benefit that’s associated with the corresponding Savings Plan covered usage item.
+ **Savings Plan recurring fee**: Any recurring hourly charges that correspond with your No Upfront or Partial Upfront Savings Plan. The Savings Plan recurring fee is initially added to your bill on the day that you purchase a No Upfront or Partial Upfront Savings Plan. After the initial purchase, AWS adds the recurring fee hourly.

  For an All Upfront Savings Plan, the line item indicates the portion of the Savings Plan unused during the billing period. For example, if a Savings Plan was 100% utilized for a billing period, this shows as “0” in your amortized costs view. Any number greater than “0” indicates an unused Savings Plan.
+ **Savings Plan upfront fee**: Any one-time upfront fee from your purchase of an All Upfront or Partial Upfront Savings Plan.
+ **Support fee**: Any charges that AWS charges you for a support plan. When you purchase a support plan from AWS, you pay a monthly charge in exchange for service support. The monthly fees can result in spikes on the first day of every month, when AWS charges your account.
+ **Tax**: Any taxes that are associated with the charges or fees in your cost chart. Cost Explorer adds all taxes together as a single component of your costs. If you select five or fewer filters, Cost Explorer displays your tax expenses as a single bar. If you select six or more filters, Cost Explorer displays five bars, stacks, or lines, and then aggregates all remaining items, including taxes, into a sixth bar, stack slice, or plot line that's labeled **Other**.

  If you choose to omit **RI upfront fees**, **RI recurring charges**, or **Support charges** from your chart, Cost Explorer continues to include any taxes that are associated with the charges.

  Cost Explorer displays your tax costs in the chart only when you choose **Monthly** drop down. When you filter your cost chart, the following rules govern the inclusion of taxes: 

  1. Taxes are excluded if you select non-**Linked Account** filters, either singly or in combination with other filters. 

  1. Taxes are included if you select the **Linked Accounts** filters. 
+ **Upfront reservation fee**: Any upfront fees that are charged to your account. When you purchase an All Upfront or Partial Upfront Reserved Instance from AWS, you pay an upfront fee in exchange for a lower rate for using the instance. The upfront fees can result in spikes in the chart for the days or months when you make your purchases.
+ **Usage**: Usage that AWS didn't apply reservation discounts to.

**Instance type**  
The type of RI that you specified when you launched an Amazon EC2 host, Amazon RDS instance class, Amazon Redshift node, or Amazon ElastiCache node. The instance type determines the hardware of the computer used to host your instance.

**Legal entity**  
The Seller of Record of a specific product or service. In most cases, the invoicing entity and legal entity are the same. The values might differ for third-party AWS Marketplace transactions. Possible values include:  
+ Amazon Web Services, Inc. – The entity that sells AWS services.
+ Amazon Web Services India Private Limited – The local Indian entity that acts as a reseller for AWS services in India.

**Linked account**  
The member accounts in an organization. For more information, see [Consolidated billing for AWS Organizations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html).

**Platform**  
The operating system that your RI runs on. **Platform** is either **Linux** or **Windows**.

**Purchase option**  
The method you choose to pay for your Amazon EC2 instances. This includes Reserved Instances, Spot Instances, Scheduled Reserved Instances, and On-Demand Instances.

**Region**  
The geographic areas where AWS hosts your resources.

**Resources**  
The unique identifier for your resources.  
To enable resource granularity, opt-in through on the Cost Explorer settings page as the management account. This is available for Amazon EC2 instances.

**Service**  
AWS products. To learn what's available, see [AWS Products and Services](https://aws.amazon.com/products/). You can use this dimension to filter costs by specific AWS Marketplace software, including your costs for AMIs, web services, and desktop apps. See the [ What is AWS Marketplace? ](https://docs.aws.amazon.com/marketplace/latest/controlling-access/what-is-marketplace.html) guide for more information.   
You can only filter RI Utilization reports by one service at a time and only for these services: **Amazon EC2**, **Amazon Redshift**, **Amazon RDS**, and **ElastiCache**.

**Tag**  
A label that you can use to track the costs associated with specific areas or entities within your business. For more information about working with tags, see [Applying User-Defined Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/custom-tags.html#allocation-how) and [User attributes for Cost Allocation](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/user-attributes-cost-allocation.html), and [Account tags for Cost Allocation](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/account-tags-cost-allocation.html).

**Tenancy**  
Specifies if the Amazon EC2 instance is hosted on shared or single-tenant hardware. Some tenancy values include **Shared (Default)**, **Dedicated**, and **Host**.

**Usage type**  
Usage types are the units that each service uses to measure the usage of a specific type of resource. For example, the `BoxUsage:t2.micro(Hrs)` usage type filters by the running hours of Amazon EC2 `t2.micro` instances.

**Usage type group**  
 Usage type groups are filters that collect a specific category of usage type filters into one filter. For example, `BoxUsage:c1.medium(Hrs)`,` BoxUsage:m3.xlarge(Hrs)`, and `BoxUsage:t1.micro(Hrs)` are all filters for Amazon EC2 instance running hours, so they are collected into the `EC2: Running Hours` filter.  
Usage type groups are available for DynamoDB, Amazon EC2, ElastiCache, Amazon RDS, Amazon Redshift, and Amazon S3. The specific groups available to your account depend on what services you've used. The list of groups that might be available includes but isn't limited to the following:  
+ **DDB: Data Transfer - Internet (In)**

  Filters by the costs associated with how many GB are transferred to your DynamoDB databases.
+ **DDB: Data Transfer - Internet (Out)**

  Filters by the costs associated with how many GB are transferred from your DynamoDB databases.
+ **DDB: Indexed Data Storage**

  Filters by the costs associated with how many GB that you have stored in DynamoDB.
+ **DDB: Provisioned Throughput Capacity - Read**

  Filters by the costs associated with how many units of read capacity that your DynamoDB databases used.
+ **DDB: Provisioned Throughput Capacity - Write**

  Filters by the costs associated with how many units of write capacity that your DynamoDB databases used.
+ **EC2: CloudWatch - Alarms**

  Filters by the costs associated with how many CloudWatch alarms that you have.
+ **EC2: CloudWatch - Metrics**

  Filters by the costs associated with how many CloudWatch metrics that you have.
+ **EC2: CloudWatch - Requests**

  Filters by the costs associated with how many CloudWatch requests that you make.
+ **EC2: Data Transfer - CloudFront (Out)**

  Filters by the costs associated with how many GB are transferred from your Amazon EC2 instances to a CloudFront distribution.
+ **EC2: Data Transfer - CloudFront (In)**

  Filters by the costs associated with how many GB are transferred to your Amazon EC2 instances from a CloudFront distribution.
+ **EC2: Data Transfer - Inter AZ**

  Filters by the costs associated with how many GB are transferred into, out of, or between your Amazon EC2 instances in different AZs.
+ **EC2: Data Transfer - Internet (In)**

  Filters by the costs associated with how many GB are transferred to your Amazon EC2 instances from outside the AWS network.
+ **EC2: Data Transfer - Internet (Out)**

  Filters by the costs associated with how many GB are transferred from an Amazon EC2 instance to a host outside the AWS network.
+ **EC2: Data Transfer - Region to Region (In)**

  Filters by the costs associated with how many GB are transferred to your Amazon EC2 instances from a different AWS Region.
+ **EC2: Data Transfer - Region to Region (Out)**

  Filters by the costs associated with how many GB are transferred from your Amazon EC2 instances to a different AWS Region.
+ **EC2: EBS - I/O Requests**

  Filters by the costs associated with how many I/O requests that you make to your Amazon EBS volumes.
+ **EC2: EBS - Magnetic**

  Filters by the costs associated with how many GB that you have stored on Amazon EBS Magnetic volumes.
+ **EC2: EBS - Provisioned IOPS**

  Filters by the costs associated with how many IOPS-months that you have provisioned for Amazon EBS.
+ **EC2: EBS - SSD(gp2)**

  Filters by the costs associated with how many GB per month of General Purpose storage that your Amazon EBS volumes use.
+ **EC2: EBS - SSD(io1)**

  Filters by the costs associated with how many GB per month of Provisioned IOPS SSD storage that your Amazon EBS volumes use.
+ **EC2: EBS - Snapshots**

  Filters by the costs associated with how many GB per month that your Amazon EBS snapshots store.
+ **EC2: EBS - Optimized**

  Filters by the costs associated with how many MB per instance hour that your Amazon EBS-optimized instances use.
+ **EC2: ELB - Running Hours**

  Filters by the costs associated with how many hours that your Elastic Load Balancing load balancers ran.
+ **EC2: Elastic IP - Additional Address**

  Filters by the costs associated with how many Elastic IP addresses that you attached to running Amazon EC2 instances.
+ **EC2: Elastic IP - Idle Address**

  Filters by the costs associated with Elastic IP addresses that you have that aren't attached to running Amazon EC2 instances.
+ **EC2: NAT Gateway - Data Processed**

  Filters by the costs associated with how many GB that your network address translation gateways (NAT gateways) processed.
+ **EC2: NAT Gateway - Running Hours**

  Filters by the costs associated with how many hours that your NAT gateways ran.
+ **EC2: Running Hours**

  Filters by the costs associated with how many hours that your Amazon EC2 instances ran.

  This **Usage Type Group** contains only the following **Usage Types**:
  + BoxUsage
  + DedicatedUsage
  + HostBoxUsage
  + HostUsage
  + ReservedHostUsage
  + SchedUsage
  + SpotUsage
  + UnusedBox
+ **ElastiCache: Running Hours**

  Filters by the costs associated with how many hours that your Amazon ElastiCache nodes ran.
+ **ElastiCache: Storage**

  Filters by the costs associated with how many GB that you stored in Amazon ElastiCache.
+ **RDS: Running Hours**

  Filters by the costs associated with how many hours that your Amazon RDS databases ran.

  This **Usage Type Group** contains only the following **Usage Types**:
  + AlwaysOnUsage
  + BoxUsage
  + DedicatedUsage
  + HighUsage
  + InstanceUsage
  + MirrorUsage
  + Multi-AZUsage
  + SpotUsage
+ **RDS: Data Transfer – CloudFront – In**

  Filters by the costs associated with how many GB are transferred into Amazon RDS from a CloudFront distribution.
+ **RDS: Data Transfer – CloudFront – Out**

  Filters by the costs associated with how many GB are transferred from a CloudFront distribution to Amazon RDS data transfers.
+ **RDS: Data Transfer – Direct Connect Locations – In**

  Filters by the costs associated with how many GB are transferred into Amazon RDS through a Direct Connect network connection.
+ **RDS: Data Transfer – Direct Connect Locations – Out**

  Filters by the costs associated with how many GB are transferred from Amazon RDS through a Direct Connect network connection.
+ **RDS: Data Transfer – InterAZ**

  Filters by the costs associated with how many GB are transferred into, out of, or between Amazon RDS buckets in different Availability Zones.
+ **RDS: Data Transfer – Internet – In**

  Filters by the costs associated with how many GB are transferred to your Amazon RDS databases.
+ **RDS: Data Transfer – Internet – Out**

  Filters by the costs associated with how many GB are transferred from your Amazon RDS databases.
+ **RDS: Data Transfer – Region to Region – In**

  Filters by the costs associated with how many GB are transferred to your Amazon RDS instances from a different AWS Region.
+ **RDS: Data Transfer – Region to Region – Out**

  Filters by the costs associated with how many GB are transferred from your Amazon RDS instances to a different AWS Region.
+ **RDS: I/O Requests**

  Filters by the costs associated with how many I/O requests that you make to your Amazon RDS instance.
+ **RDS: Provisioned IOPS**

  Filters by the costs associated with how many IOPS-months that you have provisioned for Amazon RDS.
+ **RDS: Storage**

  Filters by the costs associated with how many GB that you have stored in Amazon RDS.
+ **Redshift: DataScanned**

  Filters by the costs associated with how many GB that your Amazon Redshift nodes scanned.
+ **Redshift: Running Hours**

  Filters by the costs associated with how many hours that your Amazon Redshift nodes ran.
+ **S3: API Requests - Standard**

  Filters by the costs associated with `GET` and all other standard storage Amazon S3 requests.
+ **S3: Data Transfer - CloudFront (In)**

  Filters by the costs associated with how many GB are transferred into Amazon S3 from a CloudFront distribution.
+ **S3: Data Transfer - CloudFront (Out)**

  Filters by costs associated with how many GB are transferred from a CloudFront distribution to Amazon S3 data transfers, such as how much data was uploaded from your Amazon S3 bucket to your CloudFront distribution.
+ **S3: Data Transfer - Inter AZ**

  Filters by the costs associated with how many GB are transferred into, out of, or between Amazon S3 buckets in different Availability Zones.
+ **S3: Data Transfer - Internet (In)**

  Filters by the costs associated with how many GB are transferred to an Amazon S3 bucket from outside the AWS network.
+ **S3: Data Transfer - Internet (Out)**

  Filters by the costs associated with how many GB are transferred from an Amazon S3 bucket to a host outside the AWS network.
+ **S3: Data Transfer - Region to Region (In)**

  Filters by the costs associated with how many GB are transferred to Amazon S3 from a different AWS Region.
+ **S3: Data Transfer - Region to Region (Out)**

  Filters by the costs associated with how many GB are transferred from Amazon S3 to a different AWS Region.
+ **S3: Storage - Standard**

  Filters by the costs associated with how many GB that you have stored in Amazon S3.

# Choosing advanced options


You can customize how you view your data in Cost Explorer using **Advanced options** to include or exclude specific types of data. 

**To include or exclude data**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Cost Explorer**.

1. In the right pane, under **Advanced options**, under **Aggregate costs by**, choose between the following:
   + **Unblended costs**: This cost metric reflects the cost of the usage. When grouped by **Charge type**, unblended costs separate discounts into their own line items. This enables you to view the amount of each discount received.
   + **Amortized costs**: This cost metric reflects the effective cost of the upfront and monthly reservation fees spread across the billing period. By default, Cost Explorer shows the fees for Reserved Instances as a spike on the day that you're charged. However, if you choose to show costs as amortized costs, the costs are amortized over the billing period. This means that the costs are broken out into the effective daily rate. AWS estimates your amortized costs by combining your unblended costs with the amortized portion of your upfront and recurring reservation fees. For the daily view, Cost Explorer shows the unused portion of your upfront reservation fees and recurring RI charges on the first of the month.

     For example, suppose that Alejandro purchases a Partial Upfront `t2.micro` RI for a one-year term at \$130 dollars upfront. The monthly fee is \$12.48. Cost Explorer shows the costs for this RI as a spike on the first of the month. If Alejandro chooses **Amortized costs** for a 30-day month, the Cost Explorer chart shows a daily effective rate of \$10.165. This is the EC2 effective rate multiplied by the number of hours in a day.

     Amortized costs aren't available for billing periods before 2018. If you want to see how much of your reservation was unused, group by purchase option.
   + **Blended costs**: This cost metric reflects the average cost of usage across the consolidated billing family. If you use the consolidated billing feature in AWS Organizations, you can view costs using *blended rates*. For more information, see [Blended Rates and Costs](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/con-bill-blended-rates.html#Blended_CB).
   + **Net unblended costs**: This cost metric reflects the cost after discounts.
   + **Net amortized costs**: This cost metric amortizes the upfront and monthly reservation fees while including discounts such as RI volume discounts.

1. Under **Additional data settings**, select from the following:
   + **Show forecasted values**: Cost Explorer displays a forecast for how much AWS predicts you will spend over the forecast time period that you select, based on your past costs.
   + **Show only untagged resources**: By default, Cost Explorer includes costs both for resources that have cost allocation tags and for resources that don't have cost allocation tags. To find untagged resources that add to your costs, select **Show only untagged resources**. For more information about cost allocation tags, see [Organizing and tracking costs using AWS cost allocation tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html).
   + **Show only uncategorized resources**: By default, Cost Explorer includes costs both for resources that are mapped to a cost category and for resources that aren’t mapped to a cost category. To find uncategorized resources that add to your costs, select **Show only uncategorized resources**. For more information about cost categories, see [Organizing costs using AWS Cost Categories](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-cost-categories.html).

# Reading the Cost Explorer data table


A data table follows each Cost Explorer chart. The data table displays the cost figures that the chart represents. If your chart is using a grouping, the data table displays the aggregate amounts for the filter types that you choose for your chart. If your chart isn't using a grouping, the table displays the aggregate amounts for your past and forecasted cost data. You can [download](ce-download-csv.md) the .csv file that contains the complete data set for your chart.

**Note**  
For the RI Utilization and Savings report, the maximum table size is 20 rows. If the data exceeds this, it appears in a truncated form. 

In the grouped data table, each row is a value for one of the filter type options: API operations, Availability Zones, AWS services, custom cost allocation tags, instance types, member accounts, purchase options, Region, usage type, or usage type group. The columns represent time intervals. For example, the data table shows the costs for selected services for the last three months in separate columns. Then, the last column of the data table shows the aggregated total for the 3 months. 

**Note**  
Data transfer costs are included in the services that they're associated with, such as Amazon EC2 or Amazon S3. They aren't represented as either a separate line item in the data table or a bar in the chart. 

In the ungrouped data table, the row is your costs. The columns represent time intervals.

# Forecasting with Cost Explorer
Forecasting

You create a forecast by selecting a future time range for your report. For more information, see [Choosing time ranges for the data that you want to view](ce-modify.md#ce-timerange). The following section discusses the accuracy of the forecasts created by Cost Explorer and how to read them. 

A forecast is a prediction of how much you will use AWS services over the forecast time period that you selected. This forecast is based on your past usage. You can use a forecast to estimate your AWS bill and set alarms and budgets for based on predictions. Because forecasts are predictions, the forecasted billing amounts are estimated and might differ from your actual charges for each statement period. 

Like weather forecasts, billing forecasts can vary in accuracy. Different ranges of accuracy have different prediction intervals. The higher the prediction interval, the more likely the forecast has a wider range. For example, suppose that you have a budget set to 100 dollars for a given month. An 80% prediction interval might forecast your spend between 90 and 100, with a mean of 95. The range in the prediction band is dependent on your historical spend volatility, or fluctuations. The more consistent and predictable the historical spend, the narrower the prediction range in forecast spend.

Cost Explorer forecasts have a prediction interval of 80%. If AWS doesn't have enough data to forecast an 80% prediction interval, Cost Explorer doesn't provide a forecast. This is common for accounts that have less than one full billing cycle.

## Reading forecasts


How you read the Cost Explorer forecasts depends on the type of chart that you're using. Forecasts are available for both line charts and bar charts.

The 80% prediction interval appears differently on each type of chart:
+ Line charts represent the prediction interval as a set of lines that are on either side of your costs line.
+ Bar charts represent the prediction interval as two lines that are on either side of the top of your bar.

When forecasting costs, discounts are included by default.

**Note**  
If you want your forecasts to include non-recurring discounts such as refunds, we encourage you to use **Show net unblended costs**. For more information about different costs, see [Cost Explorer Advanced Options](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-advanced.html).

## Using forecasts with consolidated billing


If you use the consolidated billing feature in AWS Organizations, the forecasts are calculated with the data from all the accounts. If you add a new member account to an organization, forecasts don't include that new member account until the new spending patterns of the organization are analyzed. For more information about consolidated billing, see [Consolidated billing for AWS Organizations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html).

## Understanding your forecasts with AI explanations


Cost Explorer provides AI-powered explanations that help you understand the key drivers behind your forecast predictions. These natural language explanations are available through the Cost Explorer console and detail the primary factors influencing your predicted costs, such as seasonal patterns, usage trends, or service-specific changes. The AI explanations can help you identify optimization opportunities, communicate forecast rationale to stakeholders, and build confidence in your cost projections. To access these explanations, generate a forecast in the Cost Explorer console and select the "Generate forecast explanation" option.

**Note**  
You can also ask questions about your forecasted costs using the suggested prompts or the **Ask question** button in Cost Explorer, powered by **Amazon Q Developer**. When viewing future dates, forecast related suggested prompts appear automatically. For more information, see [Asking questions about your costs using Amazon Q Developer](ce-nlq.md).

# Asking questions about your costs using Amazon Q Developer


Cost Explorer enables you to ask questions about your AWS costs using suggested prompts or in your own words via the **Ask question** button, powered by **Amazon Q Developer**. You can receive detailed insights in **Amazon Q Developer** while Cost Explorer automatically updates its charts, tables, and report parameters including filters, groupings, and dates to reflect the analysis. This capability is available through two features: suggested prompts and the **Ask question** button.

**Topics**
+ [

## Using suggested prompts
](#ce-nlq-suggested-prompts)
+ [

## Using the Ask question button
](#ce-nlq-ask-question)
+ [

## Understanding visualization updates
](#ce-nlq-visualization-updates)
+ [

## Continuing the conversation with follow-up questions
](#ce-nlq-follow-up)
+ [

## Permissions
](#ce-nlq-permissions)

## Using suggested prompts


Cost Explorer displays suggested prompts above your Cost & Usage Overview data. These prompts surface the most commonly asked cost questions, such as "Show me my top spending services this month" or "Show my projected database cost for next month." You can click any prompt to instantly receive insights from **Amazon Q Developer** without needing to type a question.

When you click a suggested prompt, the following occurs:

1. The **Amazon Q Developer** chat panel opens automatically.

1. The prompt is submitted to **Amazon Q Developer** without requiring additional input.

1. **Amazon Q Developer** generates detailed insights in the chat panel.

1. Cost Explorer refreshes with the corresponding visualization, and all report parameters including filters, groupings, and date ranges are automatically configured in the **Report Parameters** panel.

Each time you load the page or complete a query, the prompts refresh with new suggestions. When you click a prompt during a session, it is replaced with a new prompt, ensuring you always have fresh analytical options to explore. You can scroll horizontally through the prompt container to discover additional suggestions beyond those initially visible.

## Using the Ask question button


For questions that go beyond the suggested prompts, the **Ask question** button is positioned next to the suggested prompts. When you click this button, the **Amazon Q Developer** chat panel opens and you can type any cost related question in your own words, such as "What is my current month's cost and usage compared to the previous month?" or "Show me my EC2 costs broken down by instance type for the last 3 months."

**Amazon Q Developer** processes your question and delivers insights in the chat panel while determining how to display the visualization. Cost Explorer automatically updates charts and tables when analysis is based on your cost and usage data. When **Amazon Q Developer** compiles insights from additional datasets such as pricing or anomaly detection, visualizations are displayed in **Amazon Q Developer**'s new artifacts panel.

## Understanding visualization updates


When you interact with suggested prompts or the **Ask question** button, Cost Explorer automatically updates its charts and tables when the analysis is based on your cost and usage data. All corresponding report parameters, including filters, groupings, and date ranges, are visible in the **Report Parameters** panel so you can verify exactly which data subset is included in the analysis.

When **Amazon Q Developer** draws from additional datasets to provide richer analysis, visualizations are displayed in **Amazon Q Developer**'s artifacts panel alongside the chat.

After **Amazon Q Developer** updates your Cost Explorer view, you can:
+ Save the view as a Cost Explorer report.
+ Share the URL with colleagues. All filters are preserved in the URL.
+ Bookmark the view for future reference.
+ Export the data to CSV for further analysis.
+ Manually adjust any of the filters and groupings in the **Report Parameters** panel to refine your view.

## Continuing the conversation with follow-up questions


After clicking a suggested prompt or asking a question using the **Ask question** button, you can continue the dialogue in **Amazon Q Developer** to drill deeper into your costs. For example, after seeing your top spending services, you might ask "Why did my RDS costs increase last month?" or "Break this down by region." **Amazon Q Developer** maintains the conversation context, allowing natural exploration of your cost data.

**Amazon Q Developer** draws from extensive knowledge beyond what is visible in your current Cost Explorer view, including pricing data, budget information, and anomaly detection data, to provide richer context and more comprehensive answers. If a follow-up question produces a visualization that Cost Explorer can display, it updates automatically. Otherwise, the visualization appears in **Amazon Q Developer**'s artifacts panel while insights continue in the chat.

## Permissions


To use the suggested prompts and **Ask question** button in Cost Explorer, you need the following permissions in addition to your existing Cost Explorer permissions:
+ ****Amazon Q Developer** permissions**: `q:StartConversation`, `q:SendMessage`
+ **Pass request permission**: `q:PassRequest`, which allows **Amazon Q Developer** to call AWS APIs on your behalf

For least-privilege access, create a custom IAM policy that grants only `q:StartConversation`, `q:SendMessage`, and `q:PassRequest`. Alternatively, administrators who already use **Amazon Q Developer** across multiple integrations can use the `AmazonQFullAccess` managed policy, which includes these permissions along with broader **Amazon Q Developer** access. The integration respects all existing IAM boundaries. **Amazon Q Developer** only accesses cost data you are authorized to view through Cost Explorer.

For detailed permission configurations and security considerations, see [Security for cost management capabilities in Amazon Q Developer](ce-q-security.md).

**Note**  
Organizations can restrict access to the suggested prompts and **Ask question** button while maintaining Cost Explorer access using IAM condition keys. For more information, see the [Amazon Q Developer security documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/security-iam.html).

# Comparing your costs between time periods


Cost Comparison is a feature in Cost Explorer that helps you quickly identify and understand changes in your AWS spending. It automatically analyzes cost variations between two selected months, highlighting the largest cost drivers and explaining the reasons behind these changes. The feature provides both console and API access to help you analyze cost changes across your AWS spending.

Key benefits:
+ Quickly identifies top cost changes across services, accounts, and Regions.
+ Provides detailed breakdowns of cost drivers, including usage and discount changes.
+ Reduces manual cost analysis time from hours to seconds.
+ Available in Cost Explorer at no additional cost.

## Permissions


To access data in the Cost Comparison feature, you need the following IAM permissions:
+ `ce:GetCostAndUsageComparisons`
+ `ce:GetCostComparisonDrivers`

These permissions enable you to retrieve cost and usage comparisons and cost drivers.

## Accessing the console


To analyze your cost changes in the console, you can use either the **Top trends** widget or Cost Explorer.

**To access the console**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. Do either of the following:
   + On the console home page, view the **Top trends** widget, which shows the top 10 cost variations between the previous two months.
   + In the navigation pane, choose **Cost Explorer**, and then choose **Compare** in the **Report parameters** panel.

Review the **Top Trends** widget regularly to identify significant cost changes early. For more information about this widget, see [Top trends](https://docs.aws.amazon.com/cost-management/latest/userguide/view-billing-dashboard.html#top-trends-widget).

# Understanding how a cost comparison works


You can use Cost Comparison to quickly understand your cloud spending by automatically identifying and unfolding the largest cost drivers driving the cost variations between two selected months. Cost Comparison provides a detailed breakdown for these cost variances, from usage shifts to changes in commitment-based discounts like Savings Plans coverage and applied credits, eliminating hours of manual investigation.

The **Top trends** widget on the console home page automatically applies Cost Comparison to show the top cost changes across your services, accounts, and Regions. For more information about this widget, see [Top trends](https://docs.aws.amazon.com/cost-management/latest/userguide/view-billing-dashboard.html#top-trends-widget).

You can use Cost Comparison in two main ways:
+ Query for any two months (referred to as baseline and comparison months) across any Cost Explorer dimension and cost metric. Cost Comparison analyzes your costs by:
  + Calculating the total cost for each selected dimension in the baseline month.
  + Comparing these with costs in the comparison month.
  + Ranking each resulting dimension value by the absolute cost difference.
  + Returning the top 10 increases or decreases for each dimension.

  **Example:**

  In the following example, Cost Comparison identified four services that demonstrated the largest change when comparing costs from March 2025 (comparison month) with April 2025 (baseline month):    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cost-management/latest/userguide/ce-understand-cost-comparison.html)
+ Request detailed cost drivers for the cost change associated with a specific service, account, Region, or other dimension value. Cost Comparison:
  + Identifies the specific usage type driving the largest change.
  + Calculates the total cost for each charge type in the baseline and comparison months.
  + Ranks the results by absolute cost difference.
  + Provides a breakdown of cost changes for each charge type, allowing for targeted cost savings opportunities.

  **Example:**

  In the following example, Cost Comparison identified two RDS instances in Frankfurt, Germany (Europe Region) that accounted for a \$163,336.48 cost difference between the selected months. For each instance, Cost Comparison identified additional cost drivers and their impact. The first instance (EU-InstanceUsage:db.r6g.8xl) showed increased cost and usage alongside decreased reserved capacity coverage, suggesting an opportunity to purchase additional reservations if the higher usage is expected to continue. The second instance (EU-InstanceUsage:db.t4g.xl) showed increased cost and usage with a decrease in applied credits compared to the previous month. This instance requires investigation into both the usage increase to evaluate potential reserved capacity purchases and the unexpected reduction in credits.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cost-management/latest/userguide/ce-understand-cost-comparison.html)

If you need to analyze cost changes for specific areas of your business, choose filters to focus on other dimensions like tags or cost categories. Cost Comparison supports all of the available cost metrics (unblended, net unblended, net amortized, etc.) options in Cost Explorer, giving you flexibility to view the data in the way that is most meaningful for your needs. Cost Comparison dynamically updates the drivers based on the specific cost metrics or dimensions you select.

# Performing a cost comparison


You can compare costs between any two months within the last 13 months to identify and understand changes in your AWS spending. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months. For more information, see [Configuring multi-year and granular data](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-configuring-data.html).

**Note**  
To access data in the Cost Comparison feature, you need IAM permissions. For more information, see [Permissions](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-cost-comparison.html#ce-cost-comparison-permissions).

**To perform a detailed cost comparison**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Cost Explorer**.

1. In the **Report parameters** panel, choose **Compare**.

1. For **Date range**, choose between:
   + **Relative (Month over month)**: Compare current month to previous month.
   + **Absolute (Custom)**: Compare any two months within the last 13 months (or up to 38 months if you have enabled multi-year data at monthly granularity).

1. Under **Group by**, choose a **Dimension** (for example, Service, Linked account, Region, Tag).
**Note**  
Group by resource is not available for cost comparisons.

1. Apply additional filters to narrow your analysis to specific services, accounts, or other cost dimensions.
**Note**  
Filter by resource is not available for cost comparisons.

1. View the detailed breakdown of cost changes:
   + Examine the graph and table displaying the cost comparison between the two selected periods.
   + Review the top 3 cost comparison drivers automatically highlighted by Cost Explorer. These show the most significant factors contributing to cost changes, whether increases or decreases.
   + Choose **View all** to see a comprehensive list of all cost comparison drivers.
   + For each cost comparison driver, Cost Explorer provides specific reasons for the change in costs, including usage changes, discount changes, and other charge types (for example, fees, credits).
   + Use the available Cost Explorer filters in **Report parameters** to analyze different aspects of your business. The graph and table are updated in real time, allowing you to analyze specific services, accounts, tags, or other dimensions to gain deeper insights into your cost changes.

# Exploring more data for advanced cost analysis


Cost Explorer provides AWS cost and usage data for the current month and up to the previous 13 months at daily and monthly granularity. You can query this data in the console or using the Cost Explorer API.

You can enable multi-year data (at monthly granularity) and more granular data (at hourly and daily granularity) for the previous 14 days. Once enabled, you can use this data in the console or using the Cost Explorer API.

**Topics**
+ [

# Multi-year data at monthly granularity
](ce-multi-year-data.md)
+ [

# Granular data
](ce-granular-data.md)
+ [

# Understanding your estimated monthly usage summary
](ce-estimated-monthly-usage-summary.md)
+ [

# Configuring multi-year and granular data
](ce-configuring-data.md)

# Multi-year data at monthly granularity


While you can use the default 14-month historical data to perform cost analysis at quarterly or monthly level, you should enable multi-year data in Cost Explorer if you want to evaluate your year-over-year cost or identify long-term cost trends.

You can enable up to 38 months of multi-year data at monthly granularity for your entire organization. Using multi-year data to perform cost analysis over a longer duration, you can track changes in your AWS costs as your business or applications mature, or after implementing infrastructure optimizations.

Once enabled, multi-year data is available within 48 hours. Note that this data is only available in Cost Explorer, as Savings Plans and Reservations utilization and coverage reports don’t support this data.

To enable multi-year data in Cost Explorer, see [Configuring multi-year and granular data](ce-configuring-data.md).

**Note**  
We will disable multi-year data for your organization if no one in the organization accesses it in three consecutive months. However, if you need the data, you can re-enable it in Cost Management preferences.  
Multi-year data is only available for chargeable costs in Cost Explorer. If you're onboarded to AWS Billing Conductor, you won’t be able to use this feature.

# Granular data


Cost Explorer provides hourly and resource-level granularity through three features:
+ Resource-level data at daily granularity
+ Cost and usage data for all AWS services at hourly granularity (without resource-level data)
+ EC2-Instances (Elastic Compute Cloud) resource-level data at hourly granularity

Enable one or all of these features based on how you plan on using granular data for your in-depth cost and usage analysis.

To enable granular data in Cost Explorer, see [Configuring multi-year and granular data](ce-configuring-data.md).

**Note**  
Granular data visibility is only available for billing views that show chargeable data. When you use Billing Conductor as an account in a standard billing group or billing transfer billing group, you can't view granular data in Cost Explorer.

**Topics**
+ [

# Resource-level data at daily granularity
](ce-resource-daily.md)
+ [

# Cost and usage data for all AWS services at hourly granularity (without resource-level data)
](ce-services-hourly.md)
+ [

# EC2-Instances (Elastic Compute Cloud) resource-level data at hourly granularity
](ce-ec2-hourly.md)

# Resource-level data at daily granularity


In Cost Explorer, you can enable resource-level data for your chosen AWS services at daily granularity for the past 14 days.

You can apply **Group by: Resource** to understand the cost of services by resource ID that you have enabled resource-level data for. Costs associated with services that you have not enabled resource-level data for appear under **No resource ID** in Cost Explorer. If you want to focus on resource-level costs for a specific service, choose the **Resource** filter in Cost Explorer, select the service you want to analyze, and then select all resources (if you don’t have a specific resource in mind) or a specific resource ID to understand cost and usage driven by that specific resource.

Use resource-level data to identify your cost drivers. When analyzing variances or anomalies in your AWS costs, you can group by service to first understand which service is causing the variance or anomaly. Then you can filter for that service in Cost Explorer and group by resource to create a view of costs per resource in that service. Use the Cost Explorer table and graphs to understand which specific resource has deviated from the normal usage pattern and is contributing to the variance or anomaly. If you want to understand how your spend on a specific resource has evolved over time, such as your spend on an S3 bucket, you can filter for that resource in Cost Explorer by selecting that resource ID in the **Resource** filter. Moreover, resource-level data is useful in order to understand which specific resources are consuming your Savings Plans and Reservations commitments. To create this view, you can filter for “Savings Plan Covered Usage” or “Reservation applied usage” charge types, group by resource, and filter for specific services that you have purchased Savings Plans and Reservations for.

Once enabled, resource-level data at daily granularity is available within 48 hours. Note that this data is not available for Savings Plans and Reservations utilization and coverage reports.

**Note**  
We will disable resource-level data at daily granularity for your organization if no one in the organization accesses it in three consecutive months. However, if you need the data, you can re-enable it in Cost Management preferences.  
Cost Explorer displays the top 5,000 most costly resources per service. If you have more than 5,000 resources, you might not see all of them in the console. However, you can search for those resources using the resource ID. Consider using Cost and Usage Reports (CUR) to retrieve the cost and usage associated with all resources as a CSV file.

# Cost and usage data for all AWS services at hourly granularity (without resource-level data)
Cost and usage data at hourly granularity

By default, Cost Explorer provides up to 14 months of data at daily and monthly granularity. However, you can opt in to hourly granularity for the past 14 days.

You can use hourly granularity to monitor cost and usage patterns at the most granular hourly level. Such data is especially useful to understand the peak hours for your AWS usage and how high the cost can go during those peak hours. If you’re thinking about purchasing Savings Plans or Reserved Instances, hourly granularity can help you understand your average spend per hour so that you make optimal purchases. If you’re thinking about fine tuning your architecture or planning to start a new project, enabling hourly granularity can help your developers monitor the performance of your architecture at hourly level and identify optimization opportunities.

Once enabled, data at hourly granularity is available within 48 hours in Cost Explorer, and in Savings Plans utilization and coverage reports.

# EC2-Instances (Elastic Compute Cloud) resource-level data at hourly granularity
EC2-Instances resource-level data at hourly granularity

In Cost Explorer, you can enable EC2 resource-level data at hourly granularity for the past 14 days. Using this data, you can view your hourly cost and usage at each EC2 instance level in Cost Explorer. This helps you to understand cost and usage driven by each EC2 instance by grouping on resource and filtering your Cost Explorer view for the EC2 service.

Such data can help you analyze for variances or anomalies. For example, if you see a spike in your EC2 cost, you can use hourly granularity to pinpoint the hour when the variance started, and then group your cost by resource to understand which specific EC2 instance is causing the spike. The ability to identify the source of variance to the exact hour can help your developers understand which specific changes in their architecture caused this variance, or if this is an actual anomaly or valid spike due to increased traffic. If you’re thinking about how many EC2 Reserved Instances you should buy, understanding the number and type of instances running each hour can be useful, as you can make an informed decision to ensure you get the maximum Reserved Instances utilization. If you currently have Savings Plans or Reserved Instances, enable EC2 resource-level data at hourly granularity to understand which specific instances used your Savings Plans or Reserved Instances.

Once enabled, EC2 resource-level data at hourly granularity is available within 48 hours. This data is not available for Savings Plans and Reservations utilization and coverage reports.

# Understanding your estimated monthly usage summary


When you enable granular data in Cost Explorer, it increases the number of usage records Cost Explorer needs to host for your organization. To ensure Cost Explorer can respond to queries as quickly as possible, Cost Explorer limits the amount of granular data stored for your organization.

**Note**  
If you enable hourly granularity for both **EC2-Instances (Elastic Compute Cloud - Compute) resource-level data** and **Cost and usage data for all AWS services at hourly granularity (without resource-level data)**, you will see a drop in the hourly usage records reported against **Cost and usage**. This is because the EC2 hourly usage records are moved and reported under **EC2-Instances**.

In Cost Management preferences, you can view the estimated usage records count for your granular data preference selections and understand how close you are to the Cost Explorer data limits. See "Understanding Cost Explorer data threshold limits".

Hourly granularity in Cost Explorer is a paid feature and the cost depends on your hourly usage records count. Understanding your estimated usage records count for hourly granularity features can help you estimate the cost of these features before enabling them. See "Estimating cost for Cost Explorer hourly granularity".

**Note**  
The usage records displayed in Cost Management preferences are for your entire organization and are estimates based on your average past usage. The actual usage records in any given past, current, or future month might differ from these values. If you’re a new AWS customer and haven’t used AWS for at least a month, we can’t estimate your usage records due to insufficient data.

**Topics**
+ [

# Understanding Cost Explorer data threshold limits
](ce-data-threshold-limits.md)
+ [

# Estimating cost for Cost Explorer hourly granularity
](ce-hourly-granularity.md)

# Understanding Cost Explorer data threshold limits


Cost Explorer supports up to 500 million usage records for resource-level data at daily granularity and up to 500 million usage records for hourly granularity features (EC2 resource-level data at hourly granularity and hourly granularity for all services without resources).

To make sure Cost Explorer can deliver an optimal customer experience, if your estimated usage records is above these limits, you’ll receive a data threshold error and you won’t be able to save your preferences.

If you receive the data threshold error while setting resource-level data at daily granularity, you can reduce the number of services you want to enable resource-level data for. If the error still persists, consider retrieving your data using Cost and Usage Reports (CUR). You can set CUR to include resource IDs.

If you receive the data threshold error while setting hourly granularity, consider choosing between hourly cost and usage data for all services without resource-level data and EC2 resource-level data at hourly granularity. If the error still persists, consider retrieving your data using Cost and Usage Reports (CUR). You can set CUR to get cost and usage information at hourly granularity with resource IDs.

# Estimating cost for Cost Explorer hourly granularity


Cost Explorer offers hourly granularity data at a daily charge of \$10.00000033 per usage record, which translates to \$10.01 per 1,000 usage records monthly. A usage record corresponds to a line item with a specific resource and usage type.

Cost Explorer bills you daily based on the total hourly usage records hosted in Cost Explorer for the past 14 days. For example, if you run one EC2 instance all day every day for the past month, and you have hourly granularity enabled, Cost Explorer will host 336 records per day (24 hours x 14 days) and charge you \$10.0001 daily (\$10.00000033 per record x 336 records), resulting in a monthly bill of \$10.003 (\$10.0001 daily cost x 30).

For the provided estimated usage records count, you can calculate the cost yourself using the provided formula, or you can use AWS Pricing Calculator.

**Note**  
Granular data visibility is only available for billing views that show chargeable data. When you use Billing Conductor as an account in a standard billing group or billing transfer billing group, you can't view granular data in Cost Explorer.

# Configuring multi-year and granular data


Using the management account, you can enable multi-year data and granular data in Cost Explorer. You do this in the Cost Management preferences in the console.

However, in order to enable multi-year and granular data, you first need to manage access to view and edit your Cost Management preferences. See [Controlling access using IAM](ce-iam-access.md).

**Note**  
Granular data visibility is only available for billing views that show chargeable data. When you use Billing Conductor as an account in a standard billing group or billing transfer billing group, you can't view granular data in Cost Explorer.

**To set up multi-year and granular data**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, choose **Cost Management preferences**.

1. To get historical data for up to 38 months, select **Multi-year data at monthly granularity**.

1. To enable resource-level or hourly granular data, consider the following options:
**Note**  
The hourly data as well as daily resource-level data is available for the past 14 days.
   + Hourly granularity
     + Select **Cost and usage data for all AWS services at hourly granularity** to get hourly data for all AWS services without resource-level data.
     + Select **EC2-Instances (Elastic Compute Cloud) resource-level data** to track EC2 cost and usage at instance level at hourly granularity.
   + Daily granularity
     + Select **Resource-level data at daily granularity** to get resource-level data for individual or all AWS services.
     + Choose services from the **AWS services at daily granularity** dropdown list that you want to enable resource-level data for.
**Note**  
The dropdown list contains only those services that were used in your organization in the last six months. They are ranked starting with the costliest.

1. Choose **Save preferences**.

**Note**  
It can take up to 48 hours for changes to your data settings to reflect in Cost Explorer. Also, after saving your preferences, you won’t be able to make any additional changes for 48 hours.  
If the estimated data volume for your preferences is above the Cost Explorer limit, you'll receive an error stating that you have reached the data threshold limit and you won’t be able to save your preferences. See "Understanding Cost Explorer data threshold limits".

# Controlling access using IAM


You can use AWS Identity and Access Management (IAM) to manage access to your Cost Management preferences for individual users. You can then grant or revoke access on an individual level for each IAM role or user. You’ll need to add the following actions in order to be able to view and edit preferences: `ce:GetPreferences`, `ce:UpdatePreferences`, `ce:GetDimensionValues`, and `ce:GetApproximateUsageRecords`.

The following is a sample IAM policy with the relevant actions that would provide you with access to view and edit your Cost Management preferences in order to enable multi-year and granular data:

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "ce:GetPreferences",
                "ce:UpdatePreferences",
                "ce:GetDimensionValues",
                "ce:GetApproximateUsageRecords"
            ],
            "Resource": "*"
        }
    ]
}
```

------

# Using the AWS Cost Explorer API


The Cost Explorer API allows you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for DynamoDB database tables in your production environment.

If you use a programming language that AWS provides an SDK for, we recommend that you use the SDK. All the AWS SDKs greatly simplify the process of signing requests and save you a significant amount of time when compared with using the AWS Cost Explorer API. In addition, the SDKs integrate easily with your development environment and provide easy access to related commands.

For more information about available SDKs, see [Tools for Amazon Web Services](https://aws.amazon.com/tools). For more information about the AWS Cost Explorer API, see the [AWS Billing and Cost Management API Reference](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/).

## Service endpoint


The Cost Explorer API provides the following endpoint:

https://ce.us-east-1.amazonaws.com

## Granting IAM permissions to use the AWS Cost Explorer API


A user must be granted explicit permission to query the AWS Cost Explorer API. For the policy that grants the necessary permissions to a user, see [View costs and usage](billing-example-policies.md#example-policy-ce-api). 

# Best practices for the AWS Cost Explorer API


The following are best practices when working with the [Cost Explorer API](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Operations_AWS_Cost_Explorer_Service.html).

**Topics**
+ [

## Best practices for configuring access to the Cost Explorer API
](#ce-api-best-practices-access)
+ [

## Best practices for querying the Cost Explorer API
](#ce-api-best-practices-query)
+ [

## Best practices for optimizing your Cost Explorer API costs
](#ce-api-best-practices-optimize-costs)

## Best practices for configuring access to the Cost Explorer API


A user must be granted explicit permissions to query the Cost Explorer API. Granting a user access to the Cost Explorer API gives that user query access to any cost and usage data available to that account. For the policy that grants the necessary permissions to a user, see [View costs and usage](billing-example-policies.md#example-policy-ce-api).

When configuring access to the Cost Explorer API, we recommend creating a unique role for the user. If you want to give multiple users query access to the Cost Explorer API, we recommend creating a role for each of them.

## Best practices for querying the Cost Explorer API


When querying the Cost Explorer API, we recommend using filtering conditions to refine your queries so that you receive only the data that you need. You can do this by restricting the time range to a smaller interval or by using filters to limit the result set that your request returns. This enables your queries to return data more quickly than if you're accessing a larger set of data.

Adding one or more grouping dimensions to your query can increase the size of your result and can impact query performance. Depending on your use case, it can make sense to filter your data instead.

The Cost Explorer API can access up to 13 months of historical data and data for the current month. It can also provide 3 months of cost forecast data at the daily level of granularity and 12 months of cost forecast data at the monthly level of granularity.

## Best practices for optimizing your Cost Explorer API costs


Because you're charged for the Cost Explorer API per paginated request, we recommend identifying the exact dataset to access before submitting queries.

AWS billing information is updated up to three times daily. Typical workloads and use cases for the Cost Explorer API anticipate a call pattern cadence ranging from daily to several times per day. To receive the most up-to-date data available, query for the time period that you're interested in.

If you're creating an application using the Cost Explorer API, we recommend architecting the application so that it has a caching layer. This enables you to regularly update the underlying data for your end users, but doesn't trigger queries every time that an individual in your organization accesses it.