
Amplitude Data's Kinesis Data Firehose integration streams your Amplitude event data straight to a Kinesis Firehose stream.

## Considerations

- You need an AWS account.
- Amplitude sends the `user_id`, `event_name`, and `created_at` along with all user, group, and event properties to Firehose streams.
- Kinesis Firehose is a near real-time streaming destination, so it counts toward your Event Streaming Usage. Batch export destinations in the same **Warehouse Destination** section, such as Amazon S3, don't count toward Event Streaming Usage.
- The data Amplitude posts in Firehose is the same JSON as documented in the [Amplitude Export API](/docs/apis/analytics/export#response).
- This destination supports Identify Forwarding. Anytime you make an Identify call to Amplitude, Amplitude forwards that user information. Refer to the [Identify documentation](/docs/apis/analytics/identify) for more information.
- Enter the Role Name in this format: `arn:aws:iam::{your aws account id}:role/{role name}`.

## Set up the integration

### Kinesis setup

#### 1. Create a Kinesis Data Firehose stream

Create a [Kinesis Data Firehose stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html) in the AWS console.

#### 2. Create an IAM role

Create an [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html#roles-creatingrole-user-console) that gives Amplitude permission to **write** directly to your AWS Kinesis Data Firehose Stream.

- For Account ID, specify: 358203115967. This is Amplitude's AWS account used to export events.
- Finalize the role without assigning any policies.
- The Trust Relationships for the new role should look like this:

    ```json title="Trust Relationships"
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": "arn:aws:iam::358203115967:root"
          },
          "Action": "sts:AssumeRole"
        }
      ]
    }
    ```

#### 3. Create an IAM policy

1. Create an [IAM Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) to give Amplitude permission to write to your Kinesis Stream.
2. Select the **Create Policy from JSON** option and use the following template policy in the Policy Document field. Change `{account-id}` to your account ID, and replace `{region}` and `{stream-name}` with the applicable values. Also replace `{role-name}` with the role you just created.

    ```json
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "firehose:PutRecord",
                    "firehose:PutRecordBatch",
                    "iam:SimulatePrincipalPolicy"
                ],
                "Resource": [
                    "arn:aws:firehose:{region}:{account-id}:deliverystream/{stream-name}",
                    "arn:aws:iam::{account-id}:role/{role-name}"
                ]
            }
        ]
    }
    ```

3. Assign the new policy to the role.
      1. Open the role.
      2. Select the **Attach Policies** option, and select the new policy.

Make note of the role ARN, stream region, and stream name. You need these to set up the destination in Amplitude.

### Amplitude setup

Create a Kinesis Firehose destination in Amplitude.

1. In Amplitude Data, click **Catalog** and select the **Destinations** tab.
2. In the Warehouse Destination section, click **Kinesis Data Firehose**.
3. Enter a sync name, then click **Create Sync**.
4. Click **Edit**, then enter your AWS region, stream name, and role name (ARN) you created during Kinesis Firehose setup.
5. Use the *Send events* filter to select the events you want to send. You can send all events, but Amplitude recommends choosing the most important ones.
6. When finished, enable the destination and save.
