Integrations

Amazon Kinesis
CategoriesAll

Event

Amazon Kinesis is a platform for streaming data on AWS, offering powerful services to make it easy to load and analyze streaming data, and also providing the ability for you to build custom streaming data applications for specialized needs.

Supported Features

  • Event Forwarding

Prerequisites

In order to take advantage of the Amazon Kinesis integration, you’ll need the Stream Name, Kinesis Service Region, and either the credentials of an Identity and Access Management (IAM) user that has access to Kinesis, or the AWS Account ID of the role mParticle will assume, depending on the setup option taken.

Option 1 is role-based authentication. In this option, you apply a policy to the stream itself, granting mParticle access to write to your stream. AWS Account ID of the role mParticle will assume will have to be provided. Furthermore, a role will have to be created with the specified naming convention.

Option 2 is user-based authentication. In this option, you create a user under your own AWS account, give the user permission to write to your stream, and provide the credentials for that user to mParticle.Credentials of an Identity and Access Management (IAM) user that has access to Kinesis will have to be provided.

Refer to the links below for Amazon setup: Click here for information on Kinesis ARN syntax. Sample ARN syntax for Kinesis is: arn:aws:kinesis:{region}:{account-id}:stream/{stream-name}.

Option 1 - Role-Based Authentication

  1. Create a Stream
  • The Kinesis Stream Name and Kinesis Service Region are required for mParticle setup
  1. Create IAM Role with the following naming convention: arn:aws:iam::{account-id}:role/mparticle-kinesis-role. This naming convention is required for mParticle to be able to assume role correctly.
  2. Create a Custom Policy. Use one of the following methods to create the policy:

    1. Manual Policy Creation
    • Select Amazon Kinesis as the AWS Service
    • Include the following actions: PutRecord
    • Enter the ARN
    • Click Add Statement
    1. Create Policy from JSON
    • Attach the template policy below under the “Permissions” tab of the role. Be sure to replace the {region}, {account-id} and {stream-name} with your specific values.
{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Effect": "Allow",
           "Action": [
               "kinesis:PutRecord"
           ],
           "Resource": [
               "arn:aws:kinesis:{region}:{account-id}:stream/{stream-name}"
           ]
       }
   ]
}
  1. Create Trust Relationship for the role that allows Assume Role permissions for the below mParticle services. Replace {org-id} with your own mParticle Org ID for the External Id (e.g. orgid:1111).
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "AWS": [
          "arn:aws:iam::338661164609:role/role-lambda-verifyrequest",
          "arn:aws:iam::338661164609:role/role-ecs-mp-notification-httpservertoserverprocessor"
        ]
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "sts:ExternalId": "orgid:{org-id}"
        }
      }
    }
  ]
}

Option 2 - User-Based Authentication

  1. Create a Stream
  • The Kinesis Stream Name and Kinesis Service Region are required for mParticle setup
  1. Create an IAM user
  • Be sure to save the credentials file which contains the Access Key Id and Secret Access Key required for mParticle setup.
  1. Create a Custom Policy. Use one of the following methods to create the policy:

    1. Manual Policy Creation
    • Select Amazon Kinesis as the AWS Service
    • Include the following actions: PutRecord
    • Enter the ARN
    • Click Add Statement
    1. Create Policy from JSON
    • Paste the template policy below into the “Policy Document” field. Be sure to replace the {region}, {account-id} and {stream-name} with your specific values.
{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Effect": "Allow",
           "Action": [
               "kinesis:PutRecord"
           ],
           "Resource": [
               "arn:aws:kinesis:{region}:{account-id}:stream/{stream-name}"
           ]
       }
   ]
}
  1. Assign Customer Policy to User

Event Data Format

The event data will be forwarded as JSON objects. Please refer to the JSON documentation for a detailed description of the data format.

Configuration Settings

Setting Name Data Type Default Value Description
Access Key ID string This is your IAM user’s Access Key Id, which can be found on your IAM dashboard, or in the credentials.csv file that you might have downloaded after creating the IAM user.
Secret Access Key string This is your IAM user’s Secret Access Key, which can be found in the credentials.csv file that you might have downloaded after creating the IAM user.
AWS Account ID string This is the AWS Account that contains the role that mParticle will attempt to assume. To use role assumption, leave both credential fields empty and provide your AWS Account ID.

Connection Settings

Setting Name Data Type Default Value Platform Description
Stream Name string All This is your Kinesis stream name.
Kinesis Service Region string All This is your Kinesis endpoint region.
Unique ID string All An optional string identifier for your app that will be forwarded with each event batch. Standard app identifiers (Apple OS Bundle ID, Android Package Name) will be forwarded regardless of this setting.
Metadata Field Exclusion Custom Field All A way to exclude specific fields of metadata properties (Device Name or IP Address) in the output.
Include MP DeviceId bool False All If enabled, MP DeviceId will be forwarded with event batches.
Send Lifecycle Events bool True All If enabled, lifecycle events (application start/stop, session start/end) will be forwarded.
Send Screen Views bool True All If enabled, screen view events will be forwarded.
Send Crash Events bool True All If enabled, app crashes will be forwarded.
Send Network Performance Events bool True All If enabled, network performance events will be forwarded.
Send Custom Events bool True All If enabled, custom app events will be forwarded.
Send Push Registrations and Receipts bool True All If enabled, push registration and receipt notifications will be forwarded.
Send as Batch bool True All If enabled, this setting will cause your app’s events to be sent in (roughly) 10-minute batches per device. If disabled, mParticle will POST each event to you individually, as its received. This setting is ignored if “Wait for Complete Batch” is enabled.
Wait for Complete Batch bool False All If enabled, mParticle will POST events to you in batches only after a user session has ended, so that each event batch you receive will represent a full session of user activity within your app.
Include Location Information bool True All If enabled, location data will be forwarded with event data whenever possible.
Send Commerce Events bool True All If enabled, commerce events will be forwarded.
Include Metadata bool True All If enabled, the following metadata - application_info, device_info and source_info will be forwarded.
Include User Attribute Change Events bool False All If enabled, User Attribute Change Events will be forwarded.
Include User Identity Change Events bool False All If enabled, User Identity Change Events will be forwarded.
Send Batches without Events bool True All If enabled, batches with no events will be forwarded.
Include Event Batch Location bool False All If enabled, event batch context.location data will be forwarded with event data.

Was this page helpful?