Amazon Mobile Analytics
User Guide

Amazon Mobile Analytics Auto Export


After April 30, 2018, Amazon Mobile Analytics features will be provided only by Amazon Pinpoint. If you're new to Mobile Analytics, use Amazon Pinpoint instead. If you're currently using Mobile Analytics, see Migrating from Amazon Mobile Analytics to Amazon Pinpoint.

You can use Amazon Mobile Analytics to collect, visualize, and understand app usage data at scale. Mobile Analytics can automatically export event data from your apps to an Amazon S3 bucket or an Amazon Redshift cluster using an AWS CloudFormation stack created in your account. This data auto export makes it possible for you to analyze app usage in detail and combine this information with other business intelligence data.

Amazon S3 buckets provide secure, durable, highly scalable object storage. Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse solution that makes it simple and cost-effective to efficiently analyze all of your data using your existing business intelligence tools. AWS CloudFormation provides an easy way to create and manage a collection of related AWS resources.

If you have not already done so, first create an app and generate events before setting up auto export. For more information about creating and app and generating events, see Getting Started.

Auto Export Overview

The analytics collected by Mobile Analytics result from events sent by your app that are collected, aggregated, and then used to populate the console reports and custom dashboards. Mobile Analytics retains this data for 25 months; however, you can't directly access this data for custom analysis. To keep this data for longer than 25 months or to perform custom analysis using your own custom queries and tools, you must export the data for storage.

Mobile Analytics provides an auto export capability that stores your incoming data, either to an Amazon S3 bucket alone or to both an Amazon S3 bucket and an Amazon Redshift cluster. Mobile Analytics will create the Amazon S3 bucket or Amazon Redshift cluster when you set up auto export, or you can use an existing Amazon S3 bucket or Amazon Redshift cluster.

					Event processing in Mobile Analytics auto export to both Amazon S3 alone or Amazon S3 and Amazon Redshift together

By default, auto export of your data is not enabled. You can choose to enable auto export any time, either for specific apps individually or for all of your apps. Data export for an app begins when auto export is enabled for that app, retaining your data from that time forward.

Mobile Analytics auto exports using a single configuration, so when you set up auto export for the first time you must choose between export to Amazon S3 alone or to both Amazon S3 and Amazon Redshift. That configuration, including the destination Amazon S3 bucket or Amazon Redshift cluster, then applies to the auto export of all apps for which you have enabled auto export.

When exporting to Amazon Redshift, an Amazon EC2 instance is created. This instance reads the data that is written to the Amazon S3 bucket and then loads that data into the Amazon Redshift cluster.

Writing Events to Amazon S3

For each hour that Mobile Analytics receives event data, it writes the data as a gzip (.gz) archive file to your Amazon S3 bucket. If the volume of data for an hour is high, Mobile Analytics might write the file for that hour in multiple parts.

Mobile Analytics 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 Mobile Analytics will usually write each file once, but in some cases it will rewrite 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.

Connecting to Amazon Redshift

Amazon Redshift provides multiple ways to connect to an Amazon Redshift cluster, including programmatic access via a JDBC connection, or querying Amazon Redshift directly on your workstation using SQLWorkbench/J. For more information, see Connecting to an Amazon Redshift Cluster.

When logging in to your Amazon Redshift cluster, use the Amazon Redshift connection string which is located in the Amazon Redshift console on your cluster's configuration page. For more information, see Configuring Amazon Redshift Connections. Then use the eventreader user name and the eventreader password you specified in the auto export configuration to connect to the cluster.