---
title: AWS
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Cloud Cost Management > Setup > AWS
---

# AWS

## Overview{% #overview %}

To set up Cloud Cost Management in Datadog, you need:

1. An AWS account with billing access
1. The AWS integration installed in Datadog
1. A Cost and Usage Report (follow the steps below to create one)

## Setup{% #setup %}

You can setup using the [API](https://docs.datadoghq.com/api/latest/cloud-cost-management.md#create-cloud-cost-management-aws-cur-config), [Terraform](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/aws_cur_config), or directly in Datadog by following the instructions below.

### Configure the AWS integration{% #configure-the-aws-integration %}

Navigate to [Setup & Configuration](https://app.datadoghq.com/cost/setup), add an AWS account and follow the steps to configure the AWS integration.

**Note**: Datadog recommends configuring a Cost and Usage Report from an [AWS **management account**](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html) for cost visibility into related **member accounts**.

If you send a Cost and Usage Report from an AWS **member account**, ensure that you have selected the following options in your **management account's** [preferences](https://us-east-1.console.aws.amazon.com/cost-management/home?region=us-east-1#/settings):

- Linked Account Access
- Linked Account Refunds and Credits
- Linked Account Discounts

These settings ensure complete cost accuracy by allowing periodic cost calculations against the AWS Cost Explorer.

{% tab title="CloudFormation" %}

{% image
   source="https://docs.dd-static.net/images/cloud_cost/setup/aws_cloudformation_setup.bea40c7dcb5ed513b474c8b63c20977a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/setup/aws_cloudformation_setup.bea40c7dcb5ed513b474c8b63c20977a.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Cloud Cost Management setup form in CloudFormation mode" /%}

### Select the resources to create{% #select-the-resources-to-create %}

The CloudFormation stack can be configured in three ways depending on your existing AWS resources:

- **New setup**: Select Create Cost and Usage Report to create both the report and its S3 bucket
- **Existing bucket**: Select Create Cost and Usage Report and unselect Create S3 Bucket to use an existing S3 bucket
- **Existing report**: Unselect Create Cost and Usage Report to import an existing Cost and Usage Report

### Configure the Cost and Usage Report settings{% #configure-the-cost-and-usage-report-settings %}

Enter the following details for your Cost and Usage Report:

- Bucket Name: The S3 bucket name where the report files are stored.
- Bucket Region: The AWS [region code](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html) of the region containing your S3 bucket. For example, `us-east-1`.
- Export Path Prefix: The S3 path prefix where report files are stored.
  - **Note:** The following prefix formats are not supported: empty, starting with `/` (such as `/` or `/cost`), or ending with `/` (such as `cost/`). Prefixes containing `/` in the middle are supported (such as `cost/hourly`).
- Export Name: The name of your Cost and Usage Report.

**Note**:

- These values either locate your existing Cost and Usage Report, or define the settings for newly created resources.
- It may take between 48 and 72 hours for all available data to populate in your Datadog organization after a complete Cost and Usage Report is generated. If 72 hours have passed and the data has still not yet populated, contact [Datadog Support](https://docs.datadoghq.com/help/).

{% /tab %}

{% tab title="Terraform" %}

{% image
   source="https://docs.dd-static.net/images/cloud_cost/setup/aws_terraform_setup.0133235c2713b795db93eab1ed2a33a0.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/setup/aws_terraform_setup.0133235c2713b795db93eab1ed2a33a0.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="CCM setup page with the Terraform option selected, showing Step 1 expanded to configure Cost and Usage Report settings including bucket name, region, and export details" /%}

### Select the resources to create{% #select-the-resources-to-create %}

The Terraform configuration supports three setups depending on your existing AWS resources:

- **New setup**: Select Create Cost and Usage Report to create both the report and its S3 bucket
- **Existing bucket**: Select Create Cost and Usage Report and unselect Create S3 Bucket to use an existing S3 bucket
- **Existing bucket and report**: Unselect Create Cost and Usage Report and Create S3 Bucket to use an existing report and S3 bucket

**Note**: If using an existing bucket, verify that AWS has permission to write CURs to it. If not, you may need to update your bucket's policy.

### Configure the Cost and Usage Report settings{% #configure-the-cost-and-usage-report-settings %}

Enter the following details for your Cost and Usage Report:

- Bucket Name: The S3 bucket name where the report files are stored.
- Bucket Region: The AWS [region code](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html) of the region containing your S3 bucket. For example, `us-east-1`.
- Export Path Prefix: The S3 path prefix where report files are stored.
  - **Note:** The following prefix formats are not supported: empty, starting with `/` (such as `/` or `/cost`), or ending with `/` (such as `cost/`). Prefixes containing `/` in the middle are supported (such as `cost/hourly`).
- Export Name: The name of your Cost and Usage Report.

**Note**:

- These values either locate your existing Cost and Usage Report, or define the settings for newly created resources.
- It may take between 48 and 72 hours for all available data to populate in your Datadog organization after a complete Cost and Usage Report is generated. If 72 hours have passed and the data has still not yet populated, contact [Datadog Support](https://docs.datadoghq.com/help/).

### Copy generated Terraform HCL and apply changes{% #copy-generated-terraform-hcl-and-apply-changes %}

In the CCM Terraform setup UI, follow the instructions in the Apply Terraform Configuration step. Resolve any issues that appear while running `terraform plan` or `terraform apply` before returning to CCM to confirm account creation.
{% /tab %}

{% tab title="Manual" %}

{% image
   source="https://docs.dd-static.net/images/cloud_cost/setup/aws_manual_setup.fc19e275ba17624e5b28459113762ae9.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/setup/aws_manual_setup.fc19e275ba17624e5b28459113762ae9.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Cloud Cost Management setup form in manual mode" /%}

### Prerequisite: generate a Cost and Usage Report{% #prerequisite-generate-a-cost-and-usage-report %}

[Create a Legacy Cost and Usage Report](https://docs.aws.amazon.com/cur/latest/userguide/dataexports-create-legacy.html) in AWS under the Data Exports section.

Select the Export type Legacy CUR export.

Select the following content options:

- Export type: Legacy CUR export
- Include resource IDs
- Split cost allocation data (Enables ECS Cost Allocation. You must also opt in to [AWS Split Cost Allocation](https://docs.aws.amazon.com/cur/latest/userguide/enabling-split-cost-allocation-data.html) in Cost Explorer preferences).
- Refresh automatically

Select the following delivery options:

- Time granularity: Hourly
- Report versioning: Create new report version
- Compression type: GZIP or Parquet

### Locate the Cost and Usage Report{% #locate-the-cost-and-usage-report %}

If you have navigated away from the report that you created in the prerequisites section, follow AWS documentation to [view your Data Exports](https://docs.aws.amazon.com/cur/latest/userguide/dataexports-view.html). Select the legacy CUR export that you created, then select Edit to see the details of the export.

To enable Datadog to locate the Cost and Usage Report, complete the fields with their corresponding details:

- Bucket Name: This is the name of the S3 bucket in the Data export storage settings section.
- Bucket Region: This is the region your bucket is located. For example, `us-east-1`.
- Export Path Prefix: This is the S3 path prefix in the Data export storage settings section.
  - **Note:** The following prefix formats are not supported: empty, starting with `/` (such as `/` or `/cost`), or ending with `/` (such as `cost/`). Prefixes containing `/` in the middle are supported (such as `cost/hourly`).
- Export Name: This is the Export name in the Export name section.

**Note**: Datadog only supports legacy Cost and Usage Reports (CURs) generated by AWS. Do not modify or move the files generated by AWS, or attempt to provide access to files generated by a third party.

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
The AWS Cost and Usage Reports endpoint is used to validate the above fields against the CUR export in your S3 bucket. This endpoint is not FIPS validated.
{% /alert %}


{% /callout %}

### Configure access to the Cost and Usage Report{% #configure-access-to-the-cost-and-usage-report %}

[Create a policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html) in AWS to ensure Datadog has permissions to access the CUR and the S3 bucket it is stored in. Use the following JSON:

```yaml
{
  "Version": "2012-10-17",
  "Statement": [
      {
          "Sid": "DDCloudCostReadBucket",
          "Effect": "Allow",
          "Action": [
              "s3:ListBucket"
          ],
          "Resource": "arn:aws:s3:::BUCKETNAME"
      },
      {
          "Sid": "DDCloudCostGetBill",
          "Effect": "Allow",
          "Action": [
              "s3:GetObject"
          ],
          "Resource": "arn:aws:s3:::BUCKETNAME/REPORT_PREFIX/REPORT_NAME/*"
      },
      {
          "Sid": "DDCloudCostCheckAccuracy",
          "Effect": "Allow",
          "Action": [
              "ce:Get*"
          ],
          "Resource": "*"
      },
      {
          "Sid": "DDCloudCostListCURs",
          "Action": [
              "cur:DescribeReportDefinitions"
          ],
          "Effect": "Allow",
          "Resource": "*"
      },
      {
          "Sid": "DDCloudCostListOrganizations",
          "Action": [
              "organizations:Describe*",
              "organizations:List*"
          ],
          "Effect": "Allow",
          "Resource": "*"
      }
  ]
}
```

**Note**: Make note of the name you created for this policy for next steps.

### Attach the policy to the Datadog integration role{% #attach-the-policy-to-the-datadog-integration-role %}

Attach the new S3 policy to the Datadog integration role.

1. Navigate to Roles in the AWS IAM console.
1. Locate the role used by the Datadog integration. By default it is named **DatadogIntegrationRole**, but the name may vary if your organization has renamed it. Click the role name to open the role summary page.
1. Click Attach policies.
1. Enter the name of the S3 bucket policy created above.
1. Click Attach policy.

**Note**: It may take between 48 and 72 hours for all available data to populate in your Datadog organization after a complete Cost and Usage Report is generated. If 72 hours have passed and the data has still not yet populated, contact [Datadog Support][18].
{% /tab %}

### Account filtering{% #account-filtering %}

Use Account Filtering to control which AWS member accounts to pull into Cloud Cost Management. Filtering out accounts does not incur additional Datadog costs.

Using Account Filtering requires an AWS management account. You can configure account filters after an account has been configured in Cloud Cost Management.

**Note:** Account filters are not supported for tag search.

#### Configure account filters for an existing account{% #configure-account-filters-for-an-existing-account %}

Navigate to [**Cloud Cost** > **Settings**, select **Accounts**](https://app.datadoghq.com/cost/settings/accounts), and then click Manage Account for the management account you want to filter.

{% image
   source="https://docs.dd-static.net/images/cloud_cost/account_filtering/manage_account.e77fb1b1d1d2b3ffcd0f9e28cd9ecd51.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/account_filtering/manage_account.e77fb1b1d1d2b3ffcd0f9e28cd9ecd51.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Manage Account button on account card" /%}

Click Billing dataset to access the Account Filtering UI.

{% image
   source="https://docs.dd-static.net/images/cloud_cost/account_filtering/account_filtering.acbe59d8c10b4b90e0ae9c0bfed27d94.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/cloud_cost/account_filtering/account_filtering.acbe59d8c10b4b90e0ae9c0bfed27d94.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Account Filtering UI to filter AWS member accounts" /%}

### Getting historical data{% #getting-historical-data %}

If you configure a Cost and Usage Report that already has historical data available in S3, Datadog automatically ingests up to 15 months of historical cost data.

If your newly configured report does not have historical data, you can request a backfill from AWS:

To request a backfill of historical AWS cost data:

1. [Open an AWS support case](https://docs.aws.amazon.com/cur/latest/userguide/troubleshooting.html#backfill-data) and request a backfill of your cost data.
1. Include the **report name** and the **desired billing period** in your request.
1. Wait for AWS to process the backfill request.

When the data is backfilled by AWS, Datadog automatically ingests the data within 24 hours.

AWS cannot backfill cost data that predates your AWS account or reflects a previous AWS Organizations structure.

For more information, see the [AWS Cost and Usage Reports troubleshooting guide](https://docs.aws.amazon.com/cur/latest/userguide/troubleshooting.html#backfill-data).

## Cost types{% #cost-types %}

Visualize your ingested data using out-of-the-box cost types. The cost types differ mainly in how they report on discount rates, savings plans and reservations.

### On-demand{% #on-demand %}

**On-demand** costs represent the cost of usage at the public, on-demand rate published by AWS. This excludes all savings plans, reservations, discounts, taxes, and fees.

**Note**: In most cases, on-demand costs are not a reliable source to estimate actual costs.

### Amortized and unblended costs{% #amortized-and-unblended-costs %}

**Amortized** cost metrics distribute commitment savings throughout the discount term. This is also called *accrual basis*. Reservations and savings plans are drawn down from a monthly commitment and applied directly to covered usage, at the time of usage. Any unused remainder appears as a fee.

In contrast, **unblended** cost metrics show all charges on the date that they are incurred. This is also called *cost basis*. Reservation and savings plan fees show up on the date they were charged, and are not applied directly to covered usage. After billing data for a month is finalized, unblended metrics match the AWS invoice exactly.

### Net costs{% #net-costs %}

**Net** costs apply private discounts directly to usage. The cost of usage for a specific resource represents the effective cost after all savings are realized.

In contrast, other metrics show private discounts as separate, negative-valued line items with no resource attribution tags. Rather than attributing the discounts directly to usage, those metrics subtract discounts from the total cost.

**Net amortized** costs provide the most accurate representation for cost allocation, with all savings applied directly to usage. Net cost metrics are available if your AWS account has privately negotiated enterprise discounts. If your account does not have enterprise discounts, then **net amortized** cost and **amortized** cost are equivalent.

### Container allocation{% #container-allocation %}

**Container allocation** metrics contain all of the same costs as the AWS metrics, but with additional breakdowns and insights for container workloads. See [container cost allocation](https://docs.datadoghq.com/cloud_cost_management/container_cost_allocation.md#applying-tags) for more details.

### Example{% #example %}

The following scenario demonstrates how different cost types behave. Imagine you have:

- An EC2 instance running for one hour with the cost of $3 per compute-hour.
- A savings plan which prices this instance type at $2 per compute-hour.
- A negotiated EDP discount of 10% on top of all other discounts.

Here's how the instance cost, savings plan hourly commitment, and discount appear in each cost type:

| Cost type                                  | Usage | Savings Plan                                                                                                                      | Discount                                                                                              | Explanation                                                                                                                                                                          |
| ------------------------------------------ | ----- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| On Demand                                  | $3.00 | This is the public on-demand rate.                                                                                                |
| Unblended                                  | $3.00 | $2.00                                                                                                                             | -$0.20                                                                                                | Savings plan recurring fee and EDP discount are separate line items, not associated with a specific resource. (**Note:** the $3 resource cost is offset with `SavingsPlanNegation`.) |
| Net Unblended                              | $1.80 | Savings plan recurring fee appears as a line item with the discount applied; the cost is not associated with a specific resource. |
| Amortized                                  | $2.00 | -$0.20                                                                                                                            | Savings plan discount is applied directly to the resource cost. EDP discount is a separate line item. |
| Net Amortized                              | $1.80 | Savings plan and EDP discounts are applied directly to resource cost.                                                             |
| Net Amortized - Shared Resources Allocated | $1.80 | The same cost as Net Amortized, but this cost can be further broken down by Kubernetes dimensions and pod tags.                   |

### Cost metrics summary{% #cost-metrics-summary %}

In general:

- `aws.cost.net.amortized.shared.resources.allocated` provides the most complete cost allocation for specific workloads and teams.
- If you do not have container cost allocation, use `aws.cost.net.amortized`.
- If you do not have net amortized costs, use `aws.cost.amortized.shared.resources.allocated` or `aws.cost.amortized`.

| Metric                                              | Description                                                                                                                                                                                                                              |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aws.cost.net.amortized.shared.resources.allocated` | All of your AWS net amortized costs, with additional breakdowns and insights for container workloads. Requires [container cost allocation](https://docs.datadoghq.com/cloud_cost_management/container_cost_allocation.md#applying-tags). |
| `aws.cost.net.amortized`                            | Net amortized costs, without container cost breakdowns.                                                                                                                                                                                  |
| `aws.cost.net.unblended`                            | Net unblended costs, without container cost breakdowns. Matches the AWS invoice, with specialized discounts pre-calculated within usage costs.                                                                                           |
| `aws.cost.amortized.shared.resources.allocated`     | All of your AWS amortized costs, with additional breakdowns and insights for container workloads. Requires [container cost allocation](https://docs.datadoghq.com/cloud_cost_management/container_cost_allocation.md#applying-tags).     |
| `aws.cost.amortized`                                | Amortized costs, without container cost breakdowns.                                                                                                                                                                                      |
| `aws.cost.unblended`                                | Unblended costs, without container cost breakdowns. Matches the AWS invoice.                                                                                                                                                             |
| `aws.cost.ondemand`                                 | Costs based on the list rate provided by AWS, excluding all savings plans, reservations, discounts, taxes, and fees.                                                                                                                     |

## How Datadog enriches your AWS cost data with tags{% #how-datadog-enriches-your-aws-cost-data-with-tags %}

Datadog automatically enriches your AWS cost data with tags from multiple sources. For a comprehensive overview of how tags are applied to cost data, see [Tags](https://docs.datadoghq.com/cloud_cost_management/tags.md).

The following tag sources are available for AWS:

- Cost and Usage Report columns
- AWS Resource tags
- AWS Account tags
- AWS Integration tags
- Out-of-the-box tags
- Container workload tags
- Tag pipelines

### Cost and Usage Report columns{% #cost-and-usage-report-columns %}

All string-valued columns from the AWS [Cost and Usage Report (CUR)](https://docs.aws.amazon.com/cur/latest/userguide/data-dictionary.html) are added as tags on cost metrics.

To ensure consistency, Datadog normalizes tag keys using underscores and lowercase. For example, the CUR column `lineItem/ResourceId` maps to the tag key `line_item/resource_id`. Tag values are generally unmodified, maintaining exact casing and most special characters.

**Examples:**

| CUR Column          | CUR Value                   | Cloud Cost Tag                                |
| ------------------- | --------------------------- | --------------------------------------------- |
| lineItem/ResourceId | i-12345678a9b12cd3e         | line_item/resource_id:i-12345678a9b12cd3e     |
| product/region      | us-east-1                   | product/region:us-east-1                      |
| product/usagetype   | DataTransfer-Regional-Bytes | product/usagetype:DataTransfer-Regional-Bytes |

### AWS resource tags{% #aws-resource-tags %}

[AWS resource tags](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html) are user-defined tags that appear in the AWS console when viewing a particular resource, such as an EC2 instance or S3 bucket.

When you enable the Datadog AWS integration, Datadog automatically collects resource tags for most AWS resources. These tags are applied to all costs found in the CUR for a given resource. Resource tags are retrieved regularly and are applied to cost data starting from the day they are created or modified. Historical tag values are not overwritten when tags change.

If the AWS integration is not enabled, you can enable resource tag enrichment by activating [cost allocation tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/activating-tags.html) in AWS billing. This allows you to select a subset of resource tag keys to include as columns in the AWS CUR. Datadog automatically includes those columns as tags when processing the CUR.

### AWS organization and account tags{% #aws-organization-and-account-tags %}

AWS Organizations support [user-defined tags](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) on organizational units and accounts. Datadog automatically fetches and applies these tags to cost data. Account tags are applied to all usage associated with those accounts. Organization tags are applied to all billing data for the matching payer account.

*Requires the Datadog AWS Integration on the organization account.*

### AWS integration tags{% #aws-integration-tags %}

AWS integration tags are tags set on the AWS Integration tile in the Datadog integrations page. They are applied to all costs found in the CUR for the associated AWS account.

### Out-of-the-box tags{% #out-of-the-box-tags %}

Datadog adds out-of-the-box tags to ingested cost data to help you further break down and allocate your costs. These tags are derived from your [Cost and Usage Report (CUR)](https://docs.aws.amazon.com/cur/latest/userguide/data-dictionary.html) and make it easier to discover and understand cost data.

The following out-of-the-box tags are available for filtering and grouping data:

| Tag                                   | Description                                                                                                                                                       |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aws_product`                         | The AWS service being billed.                                                                                                                                     |
| `aws_product_family`                  | The category for the AWS service being billed (for example, Compute or Storage).                                                                                  |
| `aws_management_account_name`         | The AWS management account name associated with the item.                                                                                                         |
| `aws_management_account_id`           | The AWS management account ID associated with the item.                                                                                                           |
| `aws_member_account_name`             | The AWS member account name associated with the item.                                                                                                             |
| `aws_member_account_id`               | The AWS member account ID associated with the item.                                                                                                               |
| `aws_cost_type`                       | The type of charge covered by this item (for example, Usage, or Tax).                                                                                             |
| `aws_pricing_term`                    | Whether the usage is Reserved, Spot, or On-Demand.                                                                                                                |
| `aws_reservation_arn`                 | The ARN of the Reserved Instance that the item benefited from.                                                                                                    |
| `aws_savings_plan_arn`                | The ARN of the Savings Plan the item benefited from.                                                                                                              |
| `aws_usage_type`                      | The usage details of the item (for example, BoxUsage:i3.8xlarge).                                                                                                 |
| `aws_operation`                       | The operation associated with the item (for example, RunInstances).                                                                                               |
| `aws_region`                          | The region associated with the item (for example, us-east-1).                                                                                                     |
| `aws_availability_zone`               | The availability zone associated with the item.                                                                                                                   |
| `aws_resource_id`                     | The resource ID associated with the item.                                                                                                                         |
| `aws_instance_type`                   | The instance type of the item.                                                                                                                                    |
| `aws_instance_family`                 | The instance family associated with your item (for example, Storage optimized).                                                                                   |
| `aws_datatransfer_type`               | The type of data transfer associated with the item (for example, cross-zone or cross-region).                                                                     |
| `aws_datatransfer_direction`          | The direction of data transfer associated with the item (for example, in or out).                                                                                 |
| `is_aws_ec2_compute`                  | Whether the usage is related to EC2 compute.                                                                                                                      |
| `is_aws_ec2_compute_on_demand`        | Whether the usage is on-demand.                                                                                                                                   |
| `is_aws_ec2_compute_reservation`      | Whether the usage is associated with a Reserved Instance.                                                                                                         |
| `is_aws_ec2_capacity_reservation`     | Whether the usage is associated with a Capacity Reservation.                                                                                                      |
| `is_aws_ec2_spot_instance`            | Whether the usage is associated with a Spot Instance.                                                                                                             |
| `is_aws_ec2_savings_plan`             | Whether the usage is associated with a Savings Plan.                                                                                                              |
| `aws_bill_entity`                     | The AWS seller that your account is with. Transactions can either be an AWS Marketplace purchase (`AWS Marketplace`) or a purchase of other AWS services (`AWS`). |
| `aws_bill_type`                       | The type of bill that this report covers (such as `Purchase`).                                                                                                    |
| `aws_cost_type`                       | The type of charge covering the line item (such as `SavingsPlanCoveredUsage`).                                                                                    |
| `aws_discount_lease_term`             | The length of time that a Reserved instance is reserved for.                                                                                                      |
| `aws_discount_purchase_option`        | How you chose to pay for a reservation (such as `All Upfront`).                                                                                                   |
| `aws_ec2_compute_product_family`      | The type of usage for an EC2 Compute line item (such as `BoxUsage` or `SpotUsage`).                                                                               |
| `aws_pricing_usage_unit`              | The pricing unit that AWS used for calculating the usage cost (such as `Hours`).                                                                                  |
| `aws_reservation_modification_status` | Indicates whether the RI lease was modified or unaltered (such as `Manual`).                                                                                      |
| `bill/billing_entity`                 | The AWS seller that your account is with. Transactions can either be an AWS Marketplace purchase (`AWS Marketplace`) or a purchase of other AWS services (`AWS`). |
| `bill/bill_type`                      | The type of bill that this report covers (such as `Purchase`).                                                                                                    |
| `bill/invoicing_entity`               | The AWS entity that issues the invoice.                                                                                                                           |
| `bill/payer_account_id`               | The account ID of the paying account. For an organization in AWS Organizations, this is the account ID of the management account.                                 |
| `is_aws_ec2_compute_savings_plan`     | `true` for line items that represent EC2 Compute usage, paid for using a Savings Plan.                                                                            |
| `line_item/currency_code`             | The currency that this line item is shown in (`USD` by default).                                                                                                  |
| `line_item/legal_entity`              | The provider of your AWS services.                                                                                                                                |
| `line_item/line_item_type`            | The type of charge covered by the line item (such as `Credit`).                                                                                                   |
| `line_item/operation`                 | The specific AWS operation covered by the line item (such as `RunInstances`).                                                                                     |
| `line_item/product_code`              | The code of the product measured (such as `Amazon EC2` for Amazon Elastic Cloud Compute).                                                                         |
| `line_item/resource_id`               | The individual resource ID associated with the line item (Optional).                                                                                              |
| `line_item/tax_type`                  | The type of tax that AWS applied to the line item.                                                                                                                |
| `line_item/usage_account_id`          | The ID of the account that used the line item.                                                                                                                    |
| `line_item/usage_type`                | The usage details of the line item (such as `USW2-BoxUsage:m2.2xlarge`).                                                                                          |
| `pricing/lease_contract_length`       | The length of time that the RI is reserved for.                                                                                                                   |
| `pricing/purchase_option`             | How you chose to pay for the line item (such as `All Upfront`).                                                                                                   |
| `pricing/term`                        | Whether your AWS usage is `Reserved` or `On-Demand`.                                                                                                              |
| `pricing/unit`                        | The pricing unit that AWS used for calculating the usage cost (such as `Hours`).                                                                                  |
| `reservation/availability_zone`       | The availability zone of the resource associated with the line item (such as `us-east-1`).                                                                        |
| `reservation/modification_status`     | Shows whether the RI lease was modified or unaltered (such as `Manual`).                                                                                          |
| `reservation/reservation_arn`         | The ARN of the RI that the line item benefited from.                                                                                                              |
| `reservation/subscription_id`         | The unique ID that maps the line item with the associated offer.                                                                                                  |
| `savings_plan/instance_type_family`   | The instance family that is associated with the specified usage (such as `m4`).                                                                                   |
| `savings_plan/offering_type`          | The type of Savings Plan purchased (such as `ComputeSavingsPlans`).                                                                                               |
| `savings_plan/payment_option`         | The payment options available for the Savings Plan (such as `All Upfront`).                                                                                       |
| `savings_plan/purchase_term`          | Describes the duration or term of the Savings Plan (such as `1yr`).                                                                                               |
| `savings_plan/region`                 | The AWS Region that hosts the AWS services (such as `US East (N. Virginia)`).                                                                                     |
| `savings_plan/savings_plan_arn`       | The unique Savings Plan identifier.                                                                                                                               |

#### Cost and observability correlation{% #cost-and-observability-correlation %}

Viewing costs in context of observability data is important to understand how infrastructure changes impact costs, identify why costs change, and optimize infrastructure for both costs and performance. Datadog updates resource-identifying tags on cost data for top AWS products to simplify correlating observability and cost metrics.

For example, to view cost and utilization for each RDS database, you can create a table with `aws.cost.amortized`, `aws.rds.cpuutilization`, and `aws.rds.freeable_memory` (or any other RDS metric) and group by `dbinstanceidentifier`. To see Lambda usage and costs side by side, you can graph `aws.lambda.concurrent_executions` and `aws.cost.amortized` grouped by `functionname`.

The following out-of-the-box tags are available:

| AWS Product                         | Tag                    |
| ----------------------------------- | ---------------------- |
| ec2                                 | `instance_id`          |
| s3                                  | `bucketname`           |
| rds                                 | `dbinstanceidentifier` |
| lambda                              | `functionname`         |
| dynamodb                            | `tablename`            |
| elasticache                         | `cacheclusterid`       |
| cloudfront (distribution)           | `distributionid`       |
| cloudfront (function)               | `functionname`         |
| ec2 natgateway                      | `natgatewayid`         |
| redshift                            | `clusteridentifier`    |
| kinesis                             | `streamname`           |
| queue                               | `queuename`            |
| sns                                 | `topicname`            |
| elb (application, gateway, network) | `loadbalancer`         |
| elb (all other costs)               | `loadbalancername`     |

### Container orchestrators{% #container-orchestrators %}

Container cost allocation adds tags from the workloads incurring cost. Examples include tags from Kubernetes pods and nodes and ECS tasks and containers.

*Requires [container cost allocation](https://docs.datadoghq.com/cloud_cost_management/container_cost_allocation.md#applying-tags), and applies only to `shared.resources.allocated` metrics.*

### Tag pipelines{% #tag-pipelines %}

Finally, all of your [tag pipeline](https://docs.datadoghq.com/cloud_cost_management/allocation/tag_pipelines.md) rulesets are applied, providing complete cost allocation when infrastructure tagging is not possible. Tag pipelines are the final enrichment layer and add new tags to your cost data.

## Billing conductor{% #billing-conductor %}

[AWS Billing Conductor](https://docs.aws.amazon.com/billingconductor/latest/userguide/what-is-billingconductor.html) is a custom billing service for AWS Marketplace Channel Partners and organizations that have chargeback requirements. Billing Conductor enables customers to create a second, pro forma version of their costs to share with their customers or account owners. Billing rates, credits and fees, and overhead costs can be customized at your discretion. You can also select which accounts to include in the CUR.

**Important limitations**:

- Pro forma Cost and Usage Reports do not include discounts and taxes, which makes it difficult to compare costs in Datadog to AWS Cost Explorer.
- Adding accounts to a billing group impacts how Reservations and Savings Plans are shared across AWS accounts.

To create a billing conductor CUR, follow the [AWS Cost and Usage Reports user guide](https://docs.aws.amazon.com/cur/latest/userguide/cur-data-view.html). Ensure the CUR meets [Datadog's requirements](https://docs.datadoghq.com/cloud_cost_management/setup/aws.md#prerequisite-generate-a-cost-and-usage-report). After the billing conductor CUR is created, follow the Cloud Cost Management instructions above to set it up in Datadog.

## Further reading{% #further-reading %}

- [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management.md)
- [Gain insights into your Azure bill](https://docs.datadoghq.com/cloud_cost_management/azure.md)
- [Gain insights into your Google Cloud bill](https://docs.datadoghq.com/cloud_cost_management/google_cloud.md)
- [Gain insights into your Oracle bill](https://docs.datadoghq.com/cloud_cost_management/oracle.md)
