---
title: "Create an AWS integration"
method: POST
path: "/api/v1/integration/aws"
tags: ["AWS Integration"]
deprecated: true
---

# Create an AWS integration

`POST /api/v1/integration/aws`

> **Deprecated.**

**This endpoint is deprecated - use the V2 endpoints instead.** Create a Datadog-Amazon Web Services integration.
Using the `POST` method updates your integration configuration
by adding your new configuration to the existing one in your Datadog organization.
A unique AWS Account ID for role based authentication.

## Request body

- AWSAccount — Returns the AWS account associated with this integration.
  - `access_key_id` string — Your AWS access key ID. Only required if your AWS account is a GovCloud or China account.
  - `account_id` string — Your AWS Account ID without dashes.
  - `account_specific_namespace_rules` object — An object (in the form `{"namespace1":true/false, "namespace2":true/false}`) containing user-supplied overrides for AWS namespace metric collection. **Important**: This field only contains namespaces explicitly configured through API calls, not the comprehensive enabled or disabled status of all namespaces. If a namespace is absent from this field, it uses Datadog's internal defaults (all namespaces enabled by default, except `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage`). For a complete view of all namespace statuses, use the V2 AWS Integration API instead.
  - `cspm_resource_collection_enabled` boolean — Whether Datadog collects cloud security posture management resources from your AWS account. This includes additional resources not covered under the general `resource_collection`.
  - `excluded_regions` string[] — An array of [AWS regions](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints) to exclude from metrics collection.
  - `extended_resource_collection_enabled` boolean — Whether Datadog collects additional attributes and configuration information about the resources in your AWS account. Required for `cspm_resource_collection`.
  - `filter_tags` string[] — The array of EC2 tags (in the form `key:value`) defines a filter that Datadog uses when collecting metrics from EC2. Wildcards, such as `?` (for single characters) and `*` (for multiple characters) can also be used. Only hosts that match one of the defined tags will be imported into Datadog. The rest will be ignored. Host matching a given tag can also be excluded by adding `!` before the tag. For example, `env:production,instance-type:c1.*,!region:us-east-1`
  - `host_tags` string[] — Array of tags (in the form `key:value`) to add to all hosts and metrics reporting through this integration.
  - `metrics_collection_enabled` boolean — Whether Datadog collects metrics for this AWS account.
  - `resource_collection_enabled` boolean — Deprecated in favor of 'extended_resource_collection_enabled'. Whether Datadog collects a standard set of resources from your AWS account.
  - `role_name` string — Your Datadog role delegation name.
  - `secret_access_key` string — Your AWS secret access key. Only required if your AWS account is a GovCloud or China account.

## Response `200`

OK

- AWSAccountCreateResponse — The Response returned by the AWS Create Account call.
  - `external_id` string — AWS external_id.

## Other responses

- `400` — Bad Request
- `403` — Authentication Error
- `409` — Conflict Error
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v1.md) · [All operations](https://skmtc.net/datadog/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v1/revisions/ca5871004d26/schema)
