Amazon Kinesis Data Stream

Amplitude Data's Kinesis Data Stream integration lets you stream your Amplitude event data straight to a Kinesis Data Stream.

Considerations

  • Amplitude sends the user_id, event_name, and created_at along with all user, group, and event properties to Kinesis streams.
  • The data Amplitude posts in Kinesis is the same JSON as documented in the Amplitude Export API.
  • This destination supports Identify Forwarding. Anytime you make an Identify call to Amplitude, Amplitude forwards that user information. See Identify documentation for more information.
  • The Role Name must have this format: arn:aws:iam::{your aws account id}:role/{role name}

Setup

Kinesis setup

1. Create a Kinesis stream

Create a Kinesis stream in the AWS console.

2. Create an IAM role

Create an IAM role that gives Amplitude permission to write directly to your AWS Kinesis 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 should look like this:

    1{
    2 "Version": "2012-10-17",
    3 "Statement": [
    4 {
    5 "Effect": "Allow",
    6 "Principal": {
    7 "AWS": "arn:aws:iam::358203115967:root"
    8 },
    9 "Action": "sts:AssumeRole"
    10 }
    11 ]
    12}

3. Create an IAM policy

  1. Create an IAM Policy 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. Be sure to change the {account-id} to your account-id, and replace {region} and {stream-name} with the applicable values. Also replace {role-name} with the role just created.

    1{
    2 "Version": "2012-10-17",
    3 "Statement": [
    4 {
    5 "Effect": "Allow",
    6 "Action": [
    7 "kinesis:PutRecord",
    8 "kinesis:PutRecords",
    9 "iam:SimulatePrincipalPolicy"
    10 ],
    11 "Resource": [
    12 "arn:aws:kinesis:{region}:{account-id}:stream/{stream-name}",
    13 "arn:aws:iam::{account-id}:role/{role-name}"
    14 ]
    15 }
    16 ]
    17}
  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 destination in Amplitude.

  1. In Amplitude Data, click Catalog and select the Destinations tab.
  2. In the Warehouse Destination section, click Kinesis Data Stream.
  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 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.
Was this page helpful?

Thanks for your feedback!

April 18th, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.