

# Exploring more data for advanced cost analysis
<a name="ce-advanced-cost-analysis"></a>

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
<a name="ce-multi-year-data"></a>

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
<a name="ce-granular-data"></a>

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
<a name="ce-resource-daily"></a>

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)
<a name="ce-services-hourly"></a>

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
<a name="ce-ec2-hourly"></a>

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
<a name="ce-estimated-monthly-usage-summary"></a>

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
<a name="ce-data-threshold-limits"></a>

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
<a name="ce-hourly-granularity"></a>

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
<a name="ce-configuring-data"></a>

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
<a name="ce-iam-access"></a>

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": "*"
        }
    ]
}
```

------