This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
Overview
To set up Cloud Cost Management in Datadog, you should:
Have an AWS account with billing access
Have the AWS integration installed in Datadog
Follow the steps below to create a Cost and Usage Report
Split cost allocation data (Enables ECS Cost Allocation. You must also opt in to AWS Split Cost Allocation 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
Configure the AWS integration
Navigate to Setup & Configuration and select an AWS account from the dropdown menu to pull costs from.
Note: Datadog recommends sending a Cost and Usage Report from an AWS management account 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’spreferences:
Linked Account Access
Linked Account Refunds and Credits
Linked Account Discounts
This ensures complete cost accuracy by allowing periodic cost calculations against the AWS Cost Explorer.
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. 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.
Export Name: This is the Export name in the Export name section.
Note: Datadog only supports legacy CURs generated by AWS. Do not modify or move the files generated by AWS, or attempt to provide access to files generated by a 3rd party.
Configure access to the Cost and Usage Report
Create a policy in AWS to ensure Datadog has permissions to access the CUR and the S3 bucket it is stored in. Use the following JSON:
Tip: Make note of the name you created for this policy for next steps.
Attach the policy to the Datadog integration role
Attach the new S3 policy to the Datadog integration role.
Navigate to Roles in the AWS IAM console.
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.
Click Attach policies.
Enter the name of the S3 bucket policy created above.
Click Attach policy.
Note: Data can take up to 48 to 72 hours after setup to stabilize in Datadog.
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 costs are the costs of usage at the public, on-demand rate published by AWS. This excludes all savings plans, reservations, discounts, taxes, and fees.
In most cases, on-demand costs are not a reliable source to estimate actual 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 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 metrics contain all of the same costs as the AWS metrics, but with additional breakdowns and insights for container workloads. See container cost allocation for more details.
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
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.
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.
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.
Tag enrichment
Datadog adds tags to the ingested cost data using many sources, described in detail below.
To ensure consistency, Datadog normalizes tag keys using underscores and lower case. 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 are user-defined tags that appear in the AWS console when viewing a particular resource, like 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 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 Organizations support user-defined tags 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 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
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) 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
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 make a table with aws.cost.amortized, aws.rds.cpuutilization, and aws.rds.freeable_memory (or any other RDS metric) and group by dbinstanceidentifier. Or, 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 cost allocation adds tags from the workloads incurring cost. Examples include tags from Kubernetes pods and nodes and ECS tasks and containers.
Finally, all of your tag pipeline rulesets are applied, providing complete cost allocation when infrastructure tagging is not possible.
Billing conductor
AWS Billing Conductor is a custom billing service for AWS Marketplace Channel Partners (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.
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.
Additionally, 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. Ensure the CUR meets Datadog’s requirements.
After the billing conductor CUR is created, follow the Cloud Cost Management instructions above to set it up in Datadog.