New Auto Export for Amazon Mobile Analytics
I am still working to catch up with our development teams! Near the end of last year, the Amazon Mobile Analytics team released a new Auto Export feature. This relatively new service (see my launch blog post for more information) helps you to collect, visualize, and understand app usage, engagement, and revenue at scale. If you build your application with the AWS Mobile SDK (available for iOS and Android), Amazon Mobile Analytics will automatically collect data so that you can view it in the Amazon Mobile App Console:
Auto Export to S3
Today we are making the Mobile Analytics feature even more useful by giving you the ability to automatically export data to Amazon Simple Storage Service (Amazon S3). Once enabled for all apps or for the apps that you choose, data files in JSON format will be deposited in to the S3 bucket of your choice.
To enable Auto Export to S3, I simply visit the Console and select the apps of interest:
Then I click on Enable Auto Export and configure an S3 bucket. I can create a new bucket or use an existing one:
Amazon Mobile Analytics needs my permission to write to the bucket. When I click on Confirm and Launch 1-Click Role Creation, I am prompted to create an IAM role that has the proper permissions:
The policy is created and applied to the bucket, and the Auto Exporting is all set:
Each S3 object will contain one or more JSON objects. You can find the schema here.
Analyze in Redshift
If you want to run some advanced analytics, consider loading the data in to an Amazon Redshift table. Here’s what you need to do:
- Create a file that describes how to “flatten” the JSON object for importing.
- Upload the file to an S3 bucket and make it readable.
- Create a table and a schema in Redshift.
- Load the events from the S3 bucket into the Redshift table by way of the file you created in step 1.
- Run Redshift queries on the imported data.
To learn more about how to do this, read Score Big With Amazon Mobile Analytics and Amazon Redshift on the AWS Mobile Development Blog.
As I noted earlier, this feature was launched at the very end of 2014 and you can start using it now!