---
title: AWS Billing monitoring integration
source: https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-billing-monitoring-integration
---

[New Relic infrastructure integrations](https://docs.newrelic.com/docs/infrastructure/introduction-infra-monitoring) include an integration for reporting your AWS Billing data to New Relic. This document explains how to activate this integration and describes the data that can be reported.

## Features [#features]

New Relic's AWS Billing integration collects financial data for all your applications and AWS accounts, and then groups it to make it easier for teams to gain cost visibility. This integration collects data from different sub-accounts and services, and also evaluates your [AWS budgets](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html) in terms of actual spend and forecasted spend.

This financial data is split into the following dashboards:

-   Billing (Costs) dashboard
-   Billing (Budgets) dashboard

## Requirements [#requirements]

Before you [enable AWS budgets](#configure-budget), you must:

-   Set up an AWS budget through AWS Console for New Relic to collect AWS Billing data.
-   Enable the **Receive Billing Alerts** checkbox in **AWS console > Billing and cost management > Billing preferences**. This is necessary for Amazon to report usage fees via CloudWatch. You are not required to actually receive alerts from AWS.

> #### ⚠️ IMPORTANT
>
> You only need to enable the **Receive Billing Alerts** checkbox to access the Billing (Costs) dashboard.

## Activate integration [#activate]

To enable this integration follow standard procedures to [Connect AWS services to New Relic](https://docs.newrelic.com/docs/infrastructure/infrastructure-integrations/getting-started/connect-aws-integrations-infrastructure).

## Enable AWS budgets [#configure-budget]

Enabling AWS budgets allows New Relic to capture service consumptions as well as usage and costs information for the budgets you configured in AWS.

> #### 💡 TIP
>
> If you have **not** created a role in AWS, follow the procedure to [connect AWS to New Relic](https://docs.newrelic.com/docs/infrastructure/infrastructure-integrations/getting-started/connect-aws-integrations-infrastructure#connect) before configuring a budget policy.

1.  From the AWS Management Console, select **Services > IAM > Roles**.
2.  Select the role you have configured for New Relic, then select **Permissions**.
3.  From the selected role's **Inline policy** tab, select the expand 
    icon if one already exists, or select the option to add a new inline policy to the role.
4.  Select the option to add a custom policy.
5.  Enter a new custom policy name; for example, NewRelicBudget.
6.  Enter the following permission statement in the **Policy Document**:

    ```
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "budgets:ViewBudget"
          ],
          "Resource": "*"
        }
      ]
    }
    ```
7.  Save your changes.

> #### 💡 TIP
>
> If you're configuring New Relic to fetch [AWS budgets](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html) data from an AWS member account, make sure that the account owner has [activated IAM user access to the Billing and Cost Management console](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).

## Find and use data [#find-data]

To find your integration data in the infrastructure UI, go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS** and select one of the AWS Billing integration links.

For general information about how to find and use integration data, see [Understand integration data](https://docs.newrelic.com/docs/infrastructure/integrations/find-use-infrastructure-integration-data).

Data is attached to the `FinanceSample` [event type](https://docs.newrelic.com/docs/data-apis/understand-data/new-relic-data-types/#event-data). That event type can have four different `provider` values, depending on the type of billing data:

-   [Budgets](#billing-budget)
-   [AWS service expenses](#billing-service-cost)
-   [Aggregated account and sub-account expenses](#billing-account-cost)
-   [Unaggregated account/sub-account data, and unaggregated AWS service expenses](#billing-account-service)

Details for these types of billing data and how to query them are below:

**Budgets**

Data from the `BillingBudget` provider is related to AWS budgets. This data allows you to monitor:

-   Money spent on a budget
-   Limits you set for each budget
-   Forecasted expenses

    You can configure budgets based on usage or expense, in different currencies, or for a monthly, quarterly, or annual time period. Budgets are a great tool to monitor and control costs and take advantage of the AWS predictive model to see forecasted costs.

    **NRQL example**: For a table of different budgets with actual spend, forecast, limits, and usage vs. monetary cost, run the following NRQL query:

    ```
    SELECT latest(`provider.budgetType`) as 'Budget Type',
    	max(`provider.actualAmount`) as 'Actual Amount',
    	max(`provider.limitAmount`) as 'Budget Limit',
    	latest(`provider.forecastedAmount`) as 'Forecast'
    FROM FinanceSample
    WHERE provider='BillingBudget'
    AND providerAccountId = 'NEW_RELIC_ID_FOR_YOUR_CLOUD_ACCOUNT'
    FACET `provider.budgetName`
    SINCE 1 day ago
    ```

    > #### 💡 TIP
    >
    > The `providerAccountId` is your cloud service account ID in New Relic. You can find it in **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS**, next to **Provider account**.

**Aggregated service costs**

The data stored in the `BillingServiceCost` provider is aggregated for service costs containing the latest and most recent data for all AWS service costs in all registered accounts.

> #### 💡 TIP
>
> If you have configured multiple AWS accounts, New Relic recommends filtering by each account with the attribute `providerAccountName` or `providerAccountId`.

**NRQL example**: To group providers by service names, run the following NRQL query:

````
SELECT latest(`provider.estimatedCharges.Maximum`)
FROM FinanceSample
WHERE provider='BillingServiceCost'
AND providerAccountId = 'NEW_RELIC_ID_FOR_YOUR_CLOUD_ACCOUNT'
SINCE 1 day ago
FACET `provider.serviceName`
LIMIT 20
```

<Callout variant="tip">
  The `providerAccountId` is your cloud service account ID in New Relic. You can find it in <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS**</DNT>, next to <DNT>**Provider account**</DNT>.
</Callout>

````

**Aggregated account/subaccount costs**

The `BillingAccountCost` provider stores aggregated data for account and sub-accounts containing the latest and most recent aggregate of financial data. Please bear in mind that if you have many AWS Accounts configured it is recommended to filter by each account with the attribute `providerAccountName` or `providerAccountId`.

**NRQL example**: To group providers by account names, run the following NRQL query:

````
SELECT latest(`provider.estimatedCharges.Maximum`)
FROM FinanceSample
WHERE provider='BillingAccountCost'
AND providerAccountId = 'NEW_RELIC_ID_FOR_YOUR_CLOUD_ACCOUNT'
SINCE 1 day ago
FACET `provider.accountId`
LIMIT 20
```

<Callout variant="tip">
  The `providerAccountId` is your cloud service account ID in New Relic. You can find it in <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS**</DNT>, next to <DNT>**Provider account**</DNT>.
</Callout>

````

**Unaggregated account/subaccount and AWS service costs**

The `BillingAccountServiceCost` provider contains unaggregated data filterable by AWS account ID or AWS service name.

**NRQL example**: To understand the cost split of AWS services for a particular AWS account ID, run the following NRQL query:

````
SELECT latest(`provider.estimatedCharges.Maximum`)
FROM FinanceSample
WHERE provider='BillingAccountServiceCost'
AND providerAccountId = 'NEW_RELIC_ID_FOR_YOUR_CLOUD_ACCOUNT'
SINCE 1 day ago
FACET `provider.serviceName`
LIMIT 100
```

<DNT>**NRQL example**</DNT>: To understand the cost split of AWS accounts for your AWS EC2 service, run the following NRQL query:

```
SELECT latest(`provider.estimatedCharges.Maximum`)
	FROM FinanceSample
	WHERE provider='BillingAccountServiceCost'
	AND providerAccountId = 'NEW_RELIC_ID_FOR_YOUR_CLOUD_ACCOUNT'
	AND `provider.serviceName`='AmazonEC2'
	FACET `provider.accountId`
	SINCE 1 day ago
	LIMIT 100
```

<Callout variant="tip">
  The `providerAccountId` is your cloud service account ID in New Relic. You can find it in <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Infrastructure > AWS**</DNT>, next to <DNT>**Provider account**</DNT>.
</Callout>

````

## Configuration and polling [#polling]

You can change the polling frequency and filter data using [configuration options](https://docs.newrelic.com/docs/integrations/new-relic-integrations/getting-started/configure-polling-frequency-data-collection-cloud-integrations).

[Default polling](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integrations-list/aws-polling-intervals-infrastructure-integrations) information for the AWS Billing integration:

-   New Relic polling interval: 1 hour
-   Amazon CloudWatch data interval: 4 hours

## Metric data [#metrics]

The New Relic infrastructure AWS Billing integration collects the following metric data:

| **Data**            | **Description**                                                                                                                                                                                                                                                |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AWS Billing metrics | `EstimatedCharges`: The estimated charges for your AWS usage. This can either be estimated charges for one service or a rollup of estimated charges for all services. The currency is USD.                                                                     |
| AWS Budgets metrics | - `actualAmount`: The actual cost or usage being tracked by a budget. - `limitAmount`: The total amount of cost or usage that you want to track with a budget as an upper limit. - `forecastedAmount`: The forecasted cost or usage being tracked by a budget. |

## Other system data [#attributes]

The AWS Billing integration also collects the following [attributes](https://docs.newrelic.com/docs/accounts-partnerships/education/getting-started-new-relic/glossary#attribute):

| **Attributes**         | **Description**                                                                                                                                                                 |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AWS Billing attributes | - `Service Name`: The name of the AWS service. This dimension is omitted for the total of estimated charges across all services. - `Linked Account`: The linked account number. |
| AWS Budgets attributes | - `budgetName`: The name of a budget. Unique within accounts - `budgetType`: Whether the budget tracks monetary cost or usage                                                   |
