Menu
Amazon Mobile Analytics
User Guide

Getting Started with Auto Export to Amazon Redshift or Amazon S3

The S3 bucket and Amazon Redshift cluster must be in the US East (N. Virginia) Region.

Step 1: Go to Manage Apps

From the Amazon Mobile Analytics console, choose App Management, and then choose Manage Apps.

Step 2: Launch the Auto Export Wizard

Choose the apps for which you would like to enable auto export, and choose Enable Auto Export. Alternatively, you can select Enable Auto Export for All Apps to export all apps.

Step 3: Choose Export to Amazon Redshift + Amazon S3

Under Amazon S3, choose Get Started.

Step 4: Configure an Amazon S3 Bucket

Choose Create a new S3 bucket or use the Select an existing bucket drop-down list to choose an existing bucket. Regardless of which option you choose, you will own the S3 bucket and will be responsible for all charges incurred. For more information, see S3 Pricing. You can go to the S3 console at any time to delete the data in your S3 bucket.

Step 5: Configure S3 and S3 to Amazon Redshift Permissions

Mobile Analytics uses AWS Identity and Access Management (IAM) roles to securely access your S3 bucket through a cross account role. Choose Select/Create Role. By default, Mobile Analytics creates a new IAM role and policy with write access to the S3 bucket you selected in the previous step. We recommend you use the default setting to create a new IAM role. If you want to specify a different role or policy, choose View Details, and then choose the IAM role or policy. If you choose an existing policy, be sure it provides access to the S3 bucket you will be exporting to. Choose Allow to allow access to your Amazon S3 bucket.

Choose Create Export. Upon confirmation, your auto export setup will be complete. It can take up to one hour for events to appear in your S3 bucket.

In addition to S3, auto export to Amazon Redshift requires an EC2 IAM role. This role is used by the EC2 instance created in your account to read data from S3, and communicate with other AWS resources, such as CloudWatch and Amazon Redshift. Choose Select/Create Role. By default, Mobile Analytics creates a new IAM role and policy that allows an EC2 instance in your account to access the S3 bucket you selected in the previous step, as well as other AWS resources. We recommend that you use the default setting to create a new IAM role. If you want to specify a different role or policy, choose View Details and choose the IAM role or policy. If you choose an existing policy, be sure it provides the following:

  • Read and write access to the S3 bucket you will be exporting to.

  • Access to "cloudwatch:PutMetricData".

  • Access to "logs:*".

Choose Allow to use the EC2 role.

Step 6: Configure Auto Export to Use Amazon Redshift

Amazon Mobile Analytics uses AWS CloudFormation to create a new Amazon Redshift cluster and EC2 instance in your account. Enter a password for the "master" user, which will have full administrative permissions to your Amazon Redshift cluster. Keep this password safe. Enter a password for the "eventreader" user, which will have read-only permissions to your Amazon Redshift cluster. Distribute these credentials to anyone who needs read-only access to your data. To prevent accidental changes, we recommend you use the eventreader user when you query Amazon Redshift.

If your app records custom attributes or metrics, type the name for each attribute or metric, and press Enter. Alternatively, you can paste a newline-separated or comma-separated list of values.

Note

You must include the names of any custom attributes or metrics when you create the auto export for their data to appear in Amazon Redshift. Any attributes or metrics you add after creating the auto export may require recreating the auto export in order to appear in Amazon Redshift, thereby losing any event data already stored in Amazon Redshift.

The EC2 instance created in your account can record metrics, such as the length of time to load events into Amazon Redshift or whether the load was successful. In addition, the EC2 instance copies all logs to CloudWatch Logs. You can enable CloudWatch Metrics and Logs by selecting Enable CloudWatch Metrics and Logs.

Choosing Advanced Options allows you to specify settings to connect to your Amazon Redshift cluster and EC2 instance:

  • IP access rules - By default, your Amazon Redshift cluster and EC2 instance will be accessible from your machine only. To make your Amazon Redshift cluster and EC2 instance available to all internet addresses, choose Accessible from any IP Address. You can also specify a custom Classless Inter-Domain Routing (CIDR) rule to allow access to addresses from within your organization. For more information about CIDR notation, see Classless Inter-Domain Routing on Wikipedia.

  • Port number - The port number used by Amazon Redshift to communicate.

  • Password for the etl_user account used for loading your data from S3 to Amazon Redshift - This is the write-only password used by the EC2 instance to load data into Amazon Redshift. We recommend you use the generated password.

  • An EC2 key pair used for connecting to the EC2 instance using SSH - If you want to connect to the EC2 instance by using SSH (for example, to do custom log pulling), you must specify an EC2 key pair. You can create one in the EC2 console. You cannot change the key pair after the EC2 instance has started.

Each of the advanced options has a default value, so you do not need to specify a value unless you want a value different than the default. You can choose Advanced Options to see the default values.

Choose Create Export. It can take up to 15 minutes for your Amazon Redshift cluster to be provisioned.

Note

The EC2 instance will run continuously (and incur charges) regardless of whether new event data is being sent by your app.