Amazon Pinpoint
User Guide

Exporting Amazon Pinpoint Events to Amazon S3

Amazon Pinpoint can automatically export event data from your apps to an Amazon S3 bucket. Amazon S3 buckets provide secure, durable, highly scalable object storage. By exporting your events, you can analyze app usage in detail and combine this information with other business intelligence data.

Unlike the data streamed to Kinesis, the data that Amazon Pinpoint exports to Amazon S3 does not include campaign events.

Setting up Automatic Exports to Amazon S3

To set up automatic exports, first create the following resources in your AWS account:

  • Amazon S3 bucket to store the exported data.

  • AWS Identity and Access Management (IAM) policy that grants Amazon Pinpoint write access to the bucket.

  • IAM role that Amazon Pinpoint can assume to gain the permissions in the policy.

Then provide Amazon Pinpoint the name of the Amazon S3 bucket and the Amazon Resource Name (ARN) of the IAM role.

To create the Amazon S3 bucket

  1. Sign in to the AWS Management Console and open the Amazon S3 console at

  2. Choose Create bucket.

  3. For Bucket name, type a unique name, and for Region, select the region in which you use Amazon Pinpoint.

  4. Choose Create.

To create the IAM policy and role

To set up automatic exports

  1. Open the Amazon Pinpoint console at

  2. On the Projects page, choose the project for which you want to set up automatic exports.

  3. In the navigation menu, choose Settings.

  4. On the Project settings page, choose Event stream.

  5. For Choose how to stream the data, select Export to Amazon S3.

  6. Select the Amazon S3 bucket and the IAM role that you created.

  7. Choose Save.

Events Written to Amazon S3

As Amazon Pinpoint receives events from your app, it writes the data as a gzip (.gz) archive file to your Amazon S3 bucket. If the volume of data is high, Amazon Pinpoint might write the file in multiple parts.

Amazon Pinpoint writes the files to Amazon S3 with the following naming convention:


The name of the destination Amazon S3 bucket.


The application ID GUID.


The four-digit year.


The two-digit month.


The two-digit day.


The two-digit hour of day.


The two-digit minute.


The four-digit part number of the event archive.


An opaque 32 character hexadecimal string.

The files are written at least once, which means that Amazon Pinpoint usually writes each file once, but in some cases it rewrites a file with the same name and contents. Consequently, if Amazon S3 event notifications are enabled, you might receive multiple notifications for a file that is written multiple times. To handle these cases, design all processes that consume these files to handle repeated notifications.