---
title: Integrate via CloudFormation and CloudWatch metric stream
source: https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integration-for-metrics/via-cloudformation-cwms
---

For seamless integration of your AWS account with New Relic, this is the most recommended integration process. You can utilize API Polling for services not supported by CloudWatch Metric Stream.

## Prerequisites [#prerequisites]

Before you begin integrating your AWS account with New Relic, ensure that you meet the following prerequisites:

-   **A New Relic [Ingest - license key and a User key](https://one.newrelic.com/api-keys)**: You'll need these keys to connect your AWS services to your New Relic account.
-   **[Permissions](https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-prereqs-permissions.html)** to deploy new AWS resources and **[IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)**: You’ll need this permission for your AWS account.
-   **[Permissions](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-user-management/user-permissions/#infrastructure)** for cloud integrations: You’ll need these permissions for your New Relic account.

## Integration steps [#integration-steps]

To integrate your AWS account with New Relic using CloudFormation and CloudWatch Metric Streams, follow these steps:

1.  Navigate to [**Infrastructure > AWS**](https://one.newrelic.com/infra/infrastructure/cloud-aws).

2.  Select the correct account.

3.  Click **Set up integration**.

4.  Follow the instructions on each screen, and fill in the fields that apply to you. For this integration, choose the following options in the given screens:

    1.  **Choose Data type(s)**: Metrics
    2.  **Choose a setup method**: Automate AWS with CloudFormation (Recommended)
    3.  **Choose a metrics integration type**: CloudWatch Metric Stream (Recommended)

5.  If you are using any of the services that are not supported in CloudWatch Metric Stream, on the **Choose a metrics integration type** page, select **Yes** in the third step for API polling and continue.

    ![AWS Integration with CWMS and API Polling](https://docs.newrelic.com/images/aws-integration-cf-apipolling.webp "AWS Integration with CWMS and API Polling")

    CWMS integration of AWS services with API polling selected for unsupported services.

    Do the necessary setup as guided on the **Enable API Polling (optional)** page and continue.

6.  Auto-discovery automatically detects and visualizes the relationships between your AWS entities on maps and leverages a few other flexibilities. For more details, refer to [Auto-discovery of AWS entities](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/connect/set-up-auto-discovery-of-aws-entities/). If you want this feature, enable it on the **Enable Auto Discovery (optional)** page, and continue.

7.  Click **Launch your CloudFormation in AWS**. The CloudFormation template opens in your AWS console with the configured parameters based on your selections in New Relic, so no additional editing is necessary unless you want to make changes.

8.  Paste the Ingest - License key and the User key into your AWS console.

> #### 💡 TIP
>
> To get additional metadata from your AWS services, enable **AWS Config** from the AWS console.

10. To deploy the CloudFormation stack, in the AWS console, select **Create stack**. Creating the stack resources may take several minutes and may generate multiple stacks, depending on how you configure metrics forwarding. If stack creation fails, refer to the [troubleshooting procedure](https://docs.newrelic.com/docs/logs/troubleshooting/aws-log-integration-issues/stack-creation-fails/).

11. After a successful stack creation, switch to the New Relic platform and continue with the guided integration till you see your AWS data in New Relic.

## Related topics [#related-topics]

[Collect data from multiple AWS accounts](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/manage-aws-data/aws-multi-account/)

Learn how to collect data from multiple AWS accounts.

[AWS integrations metrics](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/manage-aws-data/aws-integrations-metrics/)

Explore and use metrics from CloudWatch Metric Stream.

[AWS integrations via CloudFormation and API Polling](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integration-for-metrics/via-cloudformation-and-api-polling)

Integrate AWS services with New Relic using CloudFormation and API Polling.

[AWS integrations via Terraform](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integration-for-metrics/terraform)

Integrate AWS services with New Relic using Terraform.

[Manual integrations from AWS console](https://docs.newrelic.com/docs/infrastructure/amazon-integrations/aws-integration-for-metrics/manual)

Manually integrate AWS services with New Relic from AWS console.
