---
title: "Create an AWS cloud authentication persona mapping"
method: POST
path: "/api/v2/cloud_auth/aws/persona_mapping"
tags: ["Cloud Authentication"]
---

# Create an AWS cloud authentication persona mapping

`POST /api/v2/cloud_auth/aws/persona_mapping`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/cloud_auth/aws/persona_mapping`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Create an AWS cloud authentication persona mapping. This endpoint associates an AWS IAM principal with a Datadog user.

## Request body

- AWSCloudAuthPersonaMappingCreateRequest: Request used to create an AWS cloud authentication persona mapping
  - `data` AWSCloudAuthPersonaMappingCreateData, required: Data for creating an AWS cloud authentication persona mapping
    - `attributes` AWSCloudAuthPersonaMappingCreateAttributes, required: Attributes for creating an AWS cloud authentication persona mapping
      - `account_identifier` string, required: Datadog account identifier (email or handle) mapped to the AWS principal
      - `arn_pattern` string, required: AWS IAM ARN pattern to match for authentication
    - `type` 'aws_cloud_auth_config', required: Type identifier for AWS cloud authentication persona mapping

## Response `201`

Created

- AWSCloudAuthPersonaMappingResponse: Response containing a single AWS cloud authentication persona mapping
  - `data` AWSCloudAuthPersonaMappingDataResponse, required: Data for AWS cloud authentication persona mapping response
    - `attributes` AWSCloudAuthPersonaMappingAttributesResponse, required: Attributes for AWS cloud authentication persona mapping response
      - `account_identifier` string, required: Datadog account identifier (email or handle) mapped to the AWS principal
      - `account_uuid` string, required: Datadog account UUID
      - `arn_pattern` string, required: AWS IAM ARN pattern to match for authentication
    - `id` string, required: Unique identifier for the persona mapping
    - `type` 'aws_cloud_auth_config', required: Type identifier for AWS cloud authentication persona mapping

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
