Overview of AWS Cost Explorer
Tags: aws, awscostexplorer, billing, costmanagement
Published: 2024-04-09 01:27:21

### Why 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 view data for up to the last 13 months, forecast how much you're likely to spend for the next 12 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.https://docs.aws.amazon.com/cost-management/latest/userguide/ce-what-is.html

AWS Cost Explorer offers an easy-to-use interface to visualize and understand your AWS cost and usage over time. Previously, Cost Explorer provided up to 13 months of cost and usage data at daily and monthly granularity as a free feature, with an option for hourly granularity over the past 14 days as a paid feature. However, customers requiring multi-year analysis or understanding cost drivers with resource level details couldn’t complete these tasks in Cost Explorer. Now, with extended multi-year history and more granular resource level data within Cost Explorer, customers no longer need to leave Cost Explorer to perform the above analysis 

Cost Explorer now offers the following features for free:

- Multi-year data at monthly granularity: you can now access up to 38 months of historical data at monthly granularity, allowing for more comprehensive long-term trend analysis.
- Resource-level data at daily granularity: Cost Explorer offers resource-level data at daily granularity, spanning over the past 14 days, enabling you to dive into your cost drivers.

**Note:** The hourly data as well as daily resource-level data is available for the past 14 days.

### 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 last 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 refreshes your cost data at least once every 24 hours.
You can launch Cost Explorer if your account is a member account in an organization where the management account enabled Cost Explorer.

**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.

### To sign up for Cost Explorer

- Sign in to the AWS Management Console and open the AWS Cost Management console.
- In the navigation pane, choose Cost Explorer.
- On the Welcome to Cost Explorer page, choose Launch Cost Explorer.

### Starting Cost Explorer

After you enable Cost Explorer, you can launch it from the AWS Cost Management console.
Start Cost Explorer by opening the AWS Cost Management console.

**To open Cost Explorer**

- Sign in to the AWS Management Console and open the AWS Cost Management console at https://console.aws.amazon.com/cost-management/home.

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

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

Enable multi-year data at monthly granularity and resource-level data at daily granularity
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.

You can enable multi-year data at monthly granularity and resource-level data at daily granularity from Cost management preference page available to management account of your organization. Once these features are enabled, they can be used by all accounts in your organization.

**Note:** Enabling multi-year data at monthly granularity: You can click on the checkbox to enable this feature. Once enabled, your data should be available within 48 hours in Cost Explorer.

Enabling resource-level data at daily granularity: You can select specific services you want to enable resource data for. The services are listed in the order of their contribution to your AWS bill, with the most expensive service on top. Once enabled, your data will be available in Cost Explorer within 48 hours.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ruls570pyizu8jy5ksx4.png)

1. Sign in to the AWS Management Console and open the AWS Cost Management console at https://console.aws.amazon.com/cost-management/home
2. In the navigation pane, choose Cost Management preferences.
3. To get historical data for up to 38 months, select Multi-year data at monthly granularity.
4. To enable resource-level or hourly granular data, consider the following options:

- 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.

### Enabling historical data display for 38 months
Your business, applications, and architecture have matured in the past few years and you are wondering how your AWS spend has evolved along with that. You can now perform this analysis for the past three years in Cost Explorer and get a better understanding of your year-over-year or quarter-over-quarter spend patterns. In Cost Explorer, you can now select a start date within the past three years and set an end date to any date up to the present day to create multi-year data view. You can filter and group this data by various dimensions, such as service, account, region, usage type to perform comprehensive analysis.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxu6ul83manjcrveg54s.png)

### Enable Resource-level data at daily granularity

**Note:** Hourly granularity(up to 14 days of past data) is a paid feature https://docs.aws.amazon.com/cost-management/latest/userguide/ce-hourly-granularity.html

You have noticed variance in your Lambda spend in the past two weeks and you are wondering what is causing that at the resource level. You can now perform this analysis in Cost Explorer and pinpoint the exact Lambda functions responsible for the variance. You can then discuss these functions with respective teams to differentiate intended from unintended spend.

You can filter Cost Explorer for Lambda service to focus on Lambda cost and usage.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d74a7a0zpodm2js4xadb.png)