Amazon Pinpoint
User Guide

Streaming App and Campaign Events with Amazon Pinpoint

Amazon Pinpoint can stream app usage and campaign engagement data, known as events, to supported AWS services, which provide more options for analysis and storage.

After you integrate your app with Amazon Pinpoint, it reports app events, such as the number of app sessions started by users. Amazon Pinpoint provides this data in the analytics charts for that app in the console. The analytics charts also show campaign events generated by Amazon Pinpoint, such as the number of devices the campaign sent messages to.

Amazon Pinpoint retains this data for 90 days; however, you can't directly access it for custom analysis. To keep this data for an indefinite period of time, or to analyze it with custom queries and tools, you can configure Amazon Pinpoint to send events to Kinesis.

About Amazon Kinesis

The Kinesis platform offers services that you can use to load and analyze streaming data on AWS. You can configure Amazon Pinpoint to send app and campaign events to Amazon Kinesis Data Streams or Amazon Kinesis Data Firehose. By streaming your events, you enable more flexible options for data analysis, such as:

  • Converging the events from multiple apps into one stream so that you can analyze this data as a collection.

  • Analyzing events with AWS query services. For example, you can use Amazon Kinesis Data Analytics to execute SQL queries against streaming data.

About Amazon Kinesis Data Streams

Amazon Kinesis Data Streams is a service that you can use to build custom applications that process or analyze your streaming data. For example, streaming your events to Kinesis Data Streams is useful if you want to use event data in your custom dashboards, generate alerts based on events, or dynamically respond to events.

For more information, see the Amazon Kinesis Data Streams Developer Guide.

About Amazon Kinesis Data Firehose

Amazon Kinesis Data Firehose is a service that you can use to deliver your streaming data to AWS data stores, including Amazon Simple Storage Service (Amazon S3), Amazon Redshift, or Amazon Elasticsearch Service. For example, streaming your events to Kinesis Data Firehose is useful if you want to:

  • Use your own analytics applications and tools to analyze events in Amazon S3, Amazon Redshift, or Amazon Elasticsearch Service.

  • Send your events to Amazon S3 so that you can write SQL queries on this data with Amazon Athena.

  • Back up your event data for long-term storage in Amazon S3.

For more information, see the Amazon Kinesis Data Firehose Developer Guide.

Streaming Amazon Pinpoint Events to Kinesis

The Kinesis platform offers services that you can use to load and analyze streaming data on AWS. You can configure Amazon Pinpoint to send app and campaign events to Amazon Kinesis Data Streams for processing in external applications or third-party analytics tools. You can also configure Amazon Pinpoint to stream this event data to AWS datastores (such as Amazon Redshift) using Amazon Kinesis Data Firehose.

Prerequisites

Before you complete the procedure in this section, create either an Amazon Kinesis stream or a Kinesis Data Firehose delivery stream in the same account in which you use Amazon Pinpoint. To learn more about creating Kinesis streams, see Kinesis Streams in the Amazon Kinesis Data Streams Developer Guide. To learn more about creating Kinesis Data Firehose delivery streams, see Creating an Amazon Kinesis Data Firehose Delivery Stream in the Amazon Kinesis Data Firehose Developer Guide.

You can optionally create an IAM role that grants permission to send data to your stream. If you do not create this role, Amazon Pinpoint can create one for you. For more information about creating this policy manually, see Permissions Policies in the Amazon Pinpoint Developer Guide.

Setting up Event Streaming

Complete the following steps in Amazon Pinpoint to set up event streaming.

To set up event streaming

  1. Sign in to the AWS Management Console and open the Amazon Pinpoint console at https://console.aws.amazon.com/pinpoint/.

  2. On the Pinpoint Projects page, choose the app for which you want to set up data streaming.

  3. In the navigation pane, under Settings, choose Event stream.

  4. In the Services section, choose Edit.

  5. Choose Stream to Amazon Kinesis.

  6. Under Stream, choose one of the following options:

    • Send events to an Amazon Kinesis stream – Choose this option if you want to send Amazon Pinpoint event data to an external application for analysis.

    • Send events to an Amazon Kinesis Data Firehose delivery stream – choose this option if you want to send event data to an AWS datastore, such as Amazon Redshift.

  7. For Amazon Kinesis stream or Amazon Kinesis Data Firehose delivery stream, choose the Amazon Kinesis stream that you want to use to export the data.

    Note

    If you haven't already created an Amazon Kinesis stream, go to the Amazon Kinesis console at https://console.aws.amazon.com/kinesis. For more information about creating streams, see the Amazon Kinesis Data Streams Developer Guide or the Amazon Kinesis Data Firehose Developer Guide.

  8. Under IAM role, choose one of the following options:

    • Use an existing role – choose this option to have Amazon Pinpoint assume an IAM role that already exists in your account. The role you select must allow the firehose:PutRecordBatch action. For an example of a policy that allows this action, see Permissions Policies in the Amazon Pinpoint Developer Guide.

    • Automatically create a role – choose this option to automatically create an IAM role with the required permissions. This role authorizes Amazon Pinpoint to send data to the stream you chose in step 6.

  9. Choose Save.

As Amazon Pinpoint receives events from your app and generates campaign events, it sends this data to your Kinesis stream. For more information about the data that Amazon Pinpoint sends for an event, see Event Data in the Amazon Pinpoint Developer Guide.