Join the Amazon Mobile team to learn about AWS' latest portfolio of mobile optimized services. Whether you are a mobile developer topping the charts in the app store, or a business trying to be “Mobile-first”, the cloud is a critical part of your solution, enabling you to build fast and scale easily. The five part AWS Mobile Webinar Series will help you understand how to leverage the full power of the AWS Cloud Platform offering in your mobile apps.
Part 1: Do you aspire to quickly build a mobile app or game and deliver engaging experiences to millions of users? Learn how to get started with AWS Mobile Services.
This is the first webinar of the five part series that will introduce the essential building blocks of a cloud-backed mobile app. The webinar will provide an overview of AWS Mobile Services and Connectors included in the AWS Mobile SDK and demonstrate how you can leverage these to deliver engaging experiences in your app.
2. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Manage users and
identity providers
Securely access
cloud resources
Sync user prefs
across devices
Track active users,
engagement
Manage funnels,
Campaign performances
Store user-generated photos
Media and share them
Bring users back to your app by sending
messages reliably
Store and query fast NoSQL data
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
3. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Securely access
cloud resources
Track active users,
engagement
Manage funnels,
Campaign performances
Store user-generated photos
Media and share them
Bring users back to your app by sending
messages reliably
Store and query fast NoSQL data
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
Amazon Cognito
(Identity Broker)
Amazon Cognito
(Sync)
4. Authenticate users
Authorize access
AWS Identity and
Access Management
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Track active users,
engagement
Manage funnels,
Campaign performances
Store user-generated photos
Media and share them
Bring users back to your app by sending
messages reliably
Store and query fast NoSQL data
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
Amazon Cognito
(Identity Broker)
Amazon Cognito
(Sync)
5. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Store user-generated photos
Media and share them
Store shared data
Stream real-time data
Track Retention
Send push notifications
Bring users back to your app by sending
messages reliably
Store and query fast NoSQL data
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
Amazon Mobile
Analytics
Amazon Mobile
Analytics
6. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Store user-generated photos
Media and share them
Store shared data
Stream real-time data
Track Retention
Send push notifications
Bring users back to your app by sending
messages reliably
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
7. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Bring users back to your app by sending
messages reliably
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
Amazon S3
Transfer Manager
8. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Bring users back to your app by sending
messages reliably
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
Amazon S3
Transfer Manager
Amazon Kinesis
(Recorder)
9. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Amazon SNS
Mobile Push
Store shared data
Stream real-time data
Track Retention
Send push notifications
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
Amazon S3
Transfer Manager
Amazon Kinesis
(Recorder)
10. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Amazon SNS
Mobile Push
Store shared data
Stream real-time data
Track Retention
Send push notifications
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
Amazon S3
Transfer Manager
Amazon Kinesis
(Recorder)
AWS Mobile SDK
11. Fully Integrated AWS Mobile SDK
• Common authentication mechanism across
all services
• Automatically handle intermittent network
connections
• Cross-platform Support: Android, iOS, Fire
OS
• Native SDKs optimized for Mobile OS, for
example, uses the local offline caching
architecture
• Reduced memory footprint; Pick and choose
the service jars you need
12. Introducing AWS Mobile Services
Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push
Kinesis Connector DynamoDB Connector S3 Connector SQS ConnectorSES Connector
AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge Locations)
Mobile Optimized
Services
Mobile Optimized
Connectors
Core Building Block
Services
Your Mobile App, Game or Device App
AWS Mobile SDK, API Endpoints, Management Console
Compute Storage Networking Analytics Databases
Integrated SDK
14. Amazon Cognito
“Your App data is secure, available offline, and kept in sync between devices”
Simplifies Identity and
Access Management
Securely access AWS
services from Mobile
device
Cross-device and
Cross-platform Sync
Implement security best
practices
Asynchronously sync
user data across
devices and platforms
Manage unique identity
for your user across
identity providers
Guest
15. What have customers told us about “Synchronized
Profile”
People have multiple devices and want to transition between devices.
Implementing a user profile that syncs across devices, OS, apps is hard.
It not only has to work when offline, but easy to integrate with existing apps.
16. Amazon Cognito Sync
User Data
Storage and
Sync
Any Platform
Identity pool
iOS/Android/FireOS
Store App Data, Preferences and State
Save app and device data to the cloud and merge
them after login
Cross-device Cross-OS Sync
Sync user data and preferences across devices
with one line of code
Work Offline
Data always stored in local SQLite DB first.
Works seamlessly when intermittent or no
connectivity
k/v data
17. Integrating Cognito Sync functionality is dead simple
Initialize the CredentialsProvider and CognitoClient
provider = new CognitoCachingCredentialsProvider (context, AWS_ACCOUNT_ID,
COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH, COGNITO_ROLE_AUTH, Regions.US_EAST_1);
cognito = new CognitoSyncManager (context, COGNITO_POOL_ID, Regions.US_EAST_1, provider);
Create or open Dataset and Add Key Values
cognito.openOrCreateDataset(datasetName);
dataset.put(key, value);
Call synchronize on the dataset
dataset.synchronize(new SyncCallback(){..});
18. Integrating Cognito Sync functionality is dead simple
Initialize the AWSCognitoSyncClient
AWSCognitoSyncClient *syncClient = [[AWSCognitoSyncClient alloc]
initWithConfiguration: configuration];
Create or open Dataset and Add Key Values
DataSet *dataset = [syncClient openOrCreateDataSet:@"myDataSet"];
NSString *value = [dataset readStringForKey:@"myKey"];
[dataset putString:@"my value" forKey:@"myKey"];
Call synchronize on the dataset
[dataset synchronize];
iOS
20. Amazon Cognito Security
Safeguard AWS Credentials
No need to embed credentials in the app
anymore. Get least-privileged temporary
credentials.
Helps implement security best practices
Securely access any AWS Service. It simplifies
the interaction with Security Token Service and
removes the need of Token Vending Machine
Set granular access permissions on AWS
resources
Get fine-grained access control to cloud
resources.
EC2 S3 DynamoDB Kinesis
21. Unique
Joe Anna Bob Identities
Identity
Providers
Any Device
Any Platform
Any AWS
Service
Amazon Cognito Identity
Support Multiple Login Providers
Easily integrate with major login providers for
authentication.
Unique Users vs. Devices
Manage unique identities. Automatically
recognize unique user across devices and
platforms.
Mobile
Analytics
S3 DynamoDB Kinesis
22. Amazon Cognito for Unauthenticated Identities
Guest User Access
Securely access AWS resources and leverage
app features without the need to create an
account or logging in Visitor
Save Data to the Cloud
Save app and device data to the cloud and
merge them after login
Preferences
Guest
Cognito
Store
EC2 S3 DynamoDB Kinesis
24. High Scores
Joe 1500
Anna 800
Bob 750
Joe Anna Bob
Amazon DynamoDB
What is Amazon DynamoDB
• Fully managed NoSQL database service
• Provides fast and predictable performance
• Seamless scalability
• Low Latency
• Zero administration overhead
Amazon DynamoDB Object Mapper
• Simplifies access to Amazon DynamoDB in
you app
• Map client-side classes to Amazon
DynamoDB tables
• Removes the need to transform objects into
tables and vice versa.
25. Amazon DynamoDB: Example @DynamoDBTable(tableName = "Bookstore")
public static class Book {
private int id;
private String isbn, title;
private Boolean hardCover;
@DynamoDBHashKey(attributeName = "id")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@DynamoDBAttribute(attributeName="isbn")
public String getIsbn() {
return isbn;
}
...
}
Table: Bookstore
Id isbn Title hardCover
1 22-22222 My First Book Yes
2 43-43234 My Favorite Book No
3 55-12345 My New Book Yes
26. Amazon DynamoDB: Example
// Build a book object
Book book = new Book();
book.setId(17);
book.setIsbn("222-2222222222");
book.setTitle("Some Title");
book.setHardCover(true);
// Save book object to dynmaoDB
mapper.save(book);
// Update item and save object again
book.setTitle("Updated Title");
book.setHardCover(false);
mapper.save(book);
// Load another book
Book anotherBook = mapper.load(Book.class,7);
28. Amazon S3
What is Amazon S3
• Storage for the internet
• Highly-scalable, reliable, and low-latency data
storage infrastructure at very low costs
• Store any kind of data in any format
Amazon S3 Transfer Manager
• Makes it easy to access S3 from Mobile
Apps while optimizing for performance and
reliability
• Hides complexity behind a simple API
• Pause, resume, cancel functions
• Track Progress
• Multipart upload
29. Amazon S3 Connector: Transfer Manager
// Creating the transfer manager
TransferManager transferManager = new TransferManager(credentialProvider);
// Upload image
Upload upload = transferManager.upload(BUCKET_NAME, fileName, file);
// Download image
Download download = transferManager.download(BUCKET_NAME, mKey, file);
// Pause, and Resume
try {
PersistableDownload persistableDownload = download.pause();
//do something if we didn’t abort
} catch(PauseException e) {
//do something if we aborted
}
download = transferManager.resumeDownload(persistableDownload);
31. What Customers Told Us About “Push Notifications”
Sending large-scale push notifications, cross-platform is still hard.
Developers want to be able to reach their customers globally and
across all devices.
32. Each platform works differently, and push gets even more
complex as you scale to support millions of devices.
Cloud App
Platform Services Mobile Apps
33. Amazon SNS
Cross-platform
Mobile Push
Internet
Apple APNS
Google GCM
Baidu CP
Amazon ADM
Windows WNS and
MPNS
Industry’s First!
New!
iOS
Apple iPhones and iPads
Android Phones and Tablets in China
With Amazon SNS, developers can send push notifications on multiple platforms
and reach mobile users around the world
New features:
Message Expiry Time
Message Attributes
Amazon SNS Mobile Push
Android Phones and Tablets
Kindle Fire Devices
Windows Desktop and Windows Phone
Devices
35. What Customers Told Us About “Mobile Analytics”
Developers deeply value user analytics and consider it an integral part
of their app development process. They want to monitor their most
important metrics in a timely manner, and take action quickly. They
would like to own their mobile data, just like they do with any other
AWS service.
36. Amazon Mobile Analytics
“Easily collect, visualize and understand your app usage data at scale”
Scalable and Generous
Free Tier
Fast
Focus on metrics that
matter. Usage reports
available within 60
minutes of receiving data
from an app
Scale to billions of
events per day from
millions of users.
Own Your Data
Data collected are not
shared, aggregated, or
reused
37. Getting Started with Mobile Analytics in 3 steps
Sign up for AWS Account and create or use existing Cognito ID in
the AWS Management Console
Download and integrate the Mobile SDK with one line of
code (Android/FireOS, iOS)
View engagement and session activity reports in the
AWS Management console within minutes
38.
39. Key Business Metrics
(with one line of code)
1. Monthly Active Users
(MAU)
2. Daily Active Users
(DAU)
3. New Users,
4. Daily Sessions,
5. Sticky Factor,
6. 1-Day Retention,
7. Avg. Revenue per DAU,
8. Daily Paying Users,
9. Avg. Paying DAU
40. Track Retention
User retention is a key
indicator to judge the
outcome of a marketing
campaign, new feature
introduction, UX changes,
app updates, etc.
Mobile Analytics provide four
charts to track daily or
weekly rate of returning
users, after first use of the
app
41. Track Custom Events
Get behavioral insights into app specific
actions that your users take
Reports provide a view of how often custom
events occur. You can add further context
with Attributes and Metrics, to each custom
event
Examples
Track the number of
Likes/Shares, per
article, in a news app
Number of songs
played, per user
session, in a music
app
Understand player
abort rates per
level, in a game
In-app item popularity
in a shopping app
42. Integrating Mobile Analytics is super simple
Initialize the AmazonMobileAnalyticsClient. That’s it! Get Session
Activity in the AWS Management Console.
private static MobileAnalyticsManager analytics;
analytics = MobileAnalyticsManager.getOrCreateInstance(
this.getApplicationContext(),"yourCompany.yourAppId",
Regions.YOUR_REGION, config, cognitoProvider );
Add OnResume() and OnPause()
analytics.getSessionClient().resumeSession();
analytics.getSessionClient().pauseSession();
Analytics.getEventClient().submitEvents();
For Custom Events activity reports, add events.
EventClient eventClient = analytics.getEventClient();
MobileAnalyticsEvent visitEvent = eventClient.createEvent("speedSet");
eventClient.recordEvent(visitEvent);
43. Integrating Mobile Analytics is super simple
Initialize the AmazonMobileAnalytics object. That’s it! Get Session
Activity in the AWS Management Console.
AWSMobileAnalytics* analytics = [AWSMobileAnalytics
defaultAWSMobileAnalyticsWithIdentifier:@"someuniqueid"];
Create add Custom Events
id<AWSMobileAnalyticsEventClient> eventClient =
analytics.eventClient;
id<AWSMobileAnalyticsEvent> level1Event = [eventClient
createEventWithEventType:@"level1Complete"];
Submit the event. If we don't call submitEvents, events
will automatically be submitted at periodic intervals.
[eventClient submitEvents];
iOS
45. Amazon Kinesis
What is Amazon Kinesis
• Real-time processing of streaming data
• Collect and process large amount of data from
hundreds of thousands of sources
• Use Kinesis to:
- Process you application logs
- Real-time metrics and reporting
- Real-time custom analytics
Amazon Kinesis Recorder
• Reliably record data from mobile device
• Batches requests to handle intermittent
network connection
• Enables you to record events even when
the device is offline
46. Amazon Kinesis Recorder
Amazon
Kinesis
S3 Redshift
Data
AWS Aggregation
Mobile
SDK
AWS Mobile SDK
Generic batching system that
handles intermittent network
connection
48. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
Store shared data
Stream real-time data
Track Retention
Send push notifications
Manage users and
identity providers
Securely access
cloud resources
Sync user prefs
across devices
Track active users,
engagement
Manage funnels,
Campaign performances
Store user-generated photos
Media and share them
Bring users back to your app by sending
messages reliably
Store and query fast NoSQL data
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your
Mobile
App
49. Authenticate users
Amazon Cognito
(Identity Broker)
Authorize access
AWS Identity and
Access Management
Amazon Cognito
(Sync)
Analyze User Behavior
Store and share media
Synchronize data
Amazon SNS
Mobile Push
Store shared data
Stream real-time data
Track Retention
Send push notifications
Your
Mobile
App
Amazon DynamoDB
(Object Mapper)
Amazon Mobile
Analytics
Amazon Mobile
Analytics
Amazon S3
Transfer Manager
Amazon Kinesis
(Recorder)
AWS Mobile SDK
50. Key Takeaways
Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push
Kinesis Connector DynamoDB Connector S3 Connector SQS ConnectorSES Connector
AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge Locations)
Mobile Optimized
Services
Mobile Optimized
Connectors
Core Building Block
Services
Your Mobile App, Game or Device App
AWS Mobile SDK, API Endpoints, Management Console
Compute Storage Networking Analytics Databases
Integrated SDK
51. Key Takeaways
Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push
Kinesis Connector DynamoDB Connector S3 Connector SQS ConnectorSES Connector
AWS Global Infrastructure (10 Regions, Availability Zones, 51 Edge
Locations)
Mobile Optimized
Services
Mobile Optimized
Connectors
Core Building Block
Services
Your Mobile App, Game or Device App
AWS Mobile SDK, API Endpoints, Management Console
Compute Storage Networking Analytics Databases
Integrated SDK
Cross Platform
and Optimized
for Mobile
Flexibility
And Freedom
of Choice
Fully integrated
and easy to get
started
52. Thank You!
Click here for more information on AWS Mobile Services
Hinweis der Redaktion
Today we are going to talk about essential building blocks of a cloud backed mobile app. We are going to discuss some of the major challenges that mobile developers face and how AWS can help overcome these challenges though the AWS Mobile Services.
AWS Mobile Services are specifically designed to help mobile app developers with identity management & sync (Amazon Cognito), analytics (Amazon Mobile Analytics), and push notifications (Amazon SNS Mobile Push). You can easily include these services in your mobile applications using the AWS Mobile SDK, which also provides mobile-optimized access to other AWS services for cloud-storage, NoSQL Database, and real-time data-streaming.
This is an introductory webinar. At the end, you will be familiar with the portfolio of services that AWS offers that you can leverage to build high quality mobile apps. To help you develop in-depth understanding, we will have subsequent webinars in which we will talk about each service in more detail. the schedule will be posted in the coming weeks so stay tuned for that.
Lets dive in and talk about the core building blocks of a mobile app.
Synchronize Data: Lets start from the users of your mobile app. One of the most important aspect for your users is their data, preferences, settings. Users expect their data to be available in an app regardless of the platform or device that they use. They expect their preferences or profiles to be saved from one session to the next. E.g if you have a game, they expect to resume the game where they last left off. They expect their data, preferences, profile to be automatically synced and available across devices and platforms. E.g with Amazon Instant Video, users can pause a video they are watching on their Kindle Fire and resume on an iPad
- Authenticate Users: A related concept when you talk about user data is user authentication. i.e how are you able to identify your users across devices. In most cases you would use third party identity providers that your users are most likely to use like e.g Amazon, Facebook or Google. Often a login screen proves to be a point of friction. In order to have your users directly immerse in the app, you would want them to be able to skip the login screen and directly interact with the app. At the same time when the users do decide to login, they expect their preferences, settings, progress to carry over.
Store shared data: Then you may have data that is shared across users. You would want this data to be available across devices and platforms and be able to query or access it quickly with low latency.
Store and share assets and media: Appstores generally have a limit on the size of the app that can be downloaded over WAN. To reduce your app size, you can store dynamic content in a cloud. In additional may want to store your users data like pictures and video in a cloud storage as well.
Push Notifications: Push notifications are a great way to engage your users. You can leverage Push Notifications to remind users of a special ongoing promotion, breaking news, or an update to your app. It’s a great way to bring the users back to your app.
Analyze App Usage & Track Retention: Once you deploy your app, you would want track how your app is performing. You would want to track your app’s usage and customer retention. Some of the common things that you would want to track are active users, session duration, Revenue related metrics like revenue per daily active users, in-app purchases etc.
Analytics User Behavior: You would also want to track user behavior or how users interact with your app. Do they follow the expected UX flow, or is there a place where the users drop off.
Stream data in real-time: You may want to collect large amount of custom metrics from your app for off-line analysis like click-stream logs.
Authorized Access: Most importantly you want to provide secure and authorized access to cloud services.
Now lets see how AWS can help you in each of these areas
Amazon Cognito is a simple user identity and data synchronization service that helps you securely manage and synchronize app data for your users across their mobile devices.
AWS Identity and Access Management (IAM) enables you to securely control access to AWS services and resources for your users.
Amazon Mobile Analytics is a service that lets you easily collect, visualize, and understand app usage data at scale.
DynamoDB is a fast, fully managed NoSQL database as a service that makes it simple and cost-effective to store and retrieve any amount of data, and serve any level of request traffic. The Amazon DynamoDB Object Mapper, that is part of the AWS Mobile SDK, simplifies access to DynamoDB by enabling you to map your client-side classes to Amazon DynamoDB tables without having to write the code to transform objects into tables and vice versa.
Amazon S3 as you know is cloud storage for the Internet. You can store images, videos, or any other dynamic content on S3 and directly access it from your mobile app. We make it easy for you to access S3 from your mobile app using the S3 Transfer Manager
Amazon Kinesis is a fully managed service for real-time processing of streaming data at massive scale. The Kinesis Recorder batches requests to handle intermittent network connection and enable you to record events even when the device is offline.
Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, fully managed push messaging service. Amazon SNS makes it simple and cost-effective to push notifications to Apple, Google, Fire OS, and Windows devices, as well as Android devices in China with Baidu Cloud Push.
All these services come together in a single unified AWS Mobile SDK.
The AWS Mobile SDK helps you build high quality mobile apps quickly and easily. It provides access to services specifically designed for building mobile apps, mobile-optimized connectors to popular AWS data streaming, storage and database services, and access to a full array of other AWS services.
It provides a common authentication mechanism across all services.
Handles intermittent network connection for services like Mobile Analytics, Kinesis, Cognito
Provides conflict resolution for Amazon Cognito
The AWS Mobile SDK available across platfomrs, iOS, Android, FireOS
And we have reduced the footprint of the SDK so you can pick and choose the services you want in your app based on your use case.
This is how everything comes together. Integrated SDK providing access to Mobile optimized services and connectors providing compute, storage, networking, analytics and databases in the cloud. All built on AWS global infrastructure available in multiple regions, zones and edge locations.
Lets talk about each service in a bit more detail and start with user data synchronization.
Amazon Cognito is a simple user identity and data synchronization service that makes it easy to securely manage your users data across their mobile devices. You can create unique identities for your users with information from a number of public login providers
You can save application data locally on the device and then securely sync and save this data to the cloud so your application can work online and offline. You can save any kind of data in Key/Value pairs such as application preferences or game state in the AWS Cloud without having to write any backend code or manage any infrastructure.
This means you can focus on creating great experiences instead of having to worry about building and managing a backend solution to handle identity, network state, storage, and sync.
As we all know the number of devices per user is not going down any time soon. Customers have told us users with multiple devices want to be able to transition between devices seamlessly. They want a roaming synchronized app profile so they can pick up their tablet and continue playing a game at the same level they achieved on their phone. Turns out sync at scale is an hard problem to solve.
Additionally, they want to be able to access their profile even when their device is offline. To date, developers wanting to implement roaming profile functionality in their apps have had to roll their own solution or use a system tied only to a particular login provider. This either requires the developer to do more work or to limit their cross platform story.
With Amazon Cognito you can synchronize application data across an end user’s devices with a single line of code.
You can securely store user data, such as preferences, game state etc in the AWS cloud giving users a consistent, unified experience across their mobile devices and platforms.
Amazon Cognito eliminates the need to build or maintain any backend infrastructure. It manages the complexity of conflict resolution and intermittent network connectivity by managing offline cache ensuring your app can always deliver a great user experience. Each data set in the Amazon Cognito sync store can be synchronized on all devices associated with a user identity simply by calling the synchronize () method.
Lets talk about the user authentication aspect of Amazon Cognito
And Lets first touch on the security aspect. We have seen a lot of developers tend to embed their AWS credentials in their app. These credentials are compromised if the app is decompiled.
Amazon Cognito, eliminates the need to embed you AWS credentials in the app.
Your mobile app authenticates with the identity provider (IdP) using the provider’s SDK. Once the end user is authenticated with the identity provider, the OAuth or OpenID Connect token returned from the identity provider is passed by your app to Amazon Cognito, which returns a new Cognito ID for the user and a set of temporary, limited-privilege AWS credentials. Amazon Cognito supports the creation and token vending process for unauthenticated users as well as authenticated users. Amazon Cognito creates a random, unique identifier for each unauthenticated user.
You can use the unique identifier generated for your app users in your Identity and Access Management policies. For example you can create a policy for an S3 bucket that only allows a particular user access to their own folder thus setting granular access permissions on AWS resources.
As Cognito creates a unique identifier for a token returned from a login provider, it is able to synchronize data for each user across devices and platforms when they login in to your app with a specific login provider. Today Cognito supports Facebook, Google, and Amazon.
Unauthenticated guest users are equally important as logged in users. So how can we make the experience the same for both and how can we make the transition seamless for unauthenticated users when they decide to login.
Amazon Cognito creates a random, unique identifier for each unauthenticated guest so you can start saving application data for those users and also leverage the temporary, limited privilege credentials Amazon Cognito provides to access AWS resources, such as Amazon S3, Amazon DynamoDB. When your users decide to authenticate using one of the supported public login providers, Amazon Cognito ensures the data you saved against the unauthenticated profile is now associated with the new authenticated profile removing the complexity of managing user conversion.
AS mentioned, by registering an unauthenticated user or by sending a login provider token to Amazon Cognito, your application receives a set of temporary, limited privilege credentials from Amazon Cognito to access your AWS resources. Amazon Cognito takes care of all the steps necessary to create a unique identifier for your app’s users and retrieve the AWS credentials.
Thus you can use Amazon Cognito as a credential provider to access any AWS service.
We discussed user data, now lets talk about shared data.
It is highly likely that your app will have some data that you would want to share across users who will be on different platforms and devices. To ensure a fluid experience you would want quick and reliable access to the shared data. As an example, lets take one of the most common use cases in games – many games track high scores, leader boards and achievements to add a social element to the game and to increase user engagement. For that you need a quick access database in the cloud that you can query from the client. DynamoDB is a perfect solution for that.
So what is DynamoDB?
It is a fully managed NoSQL database service. Through its provisioned throughput model, it guarantees predictable performance. As your app can become an instant success overnight and your users can increase from 10s and 100s to 100 of thousands in matter of days. DynamoDB scales seamlessly. There is no cap in the table sizes and throughput limits. It uses SSD-based storage nodes that delivers low-latency access. And there is no administrative overhead.
Now lets talk about how you can access DynamoDB from the AWS Mobile SDK in you Mobile App. In addition to the low-level APIs, we provide DynamoDB Object Mapper that simplifies access to Amazon DynamoDB. Using the Object Mapper, you can map you client-side classes to DynamoDB tables. The client library handles transforming the objects into tables and vice versa, eliminating the need for you to write redundant code.
To see how easy it is to access DynmaoDB, lets look at an example
Suppose you have this DynamoDB table called BookStore. It has four fields Id, isbn, Title, and a Boolean HardCover. You would create this table in DynamoDB by going to the AWS DynamoDB Console where you can also define primary keys, read/write capacities, set up notifications and alarms etc. We will leave these details for a subsequent webinar.
Now in your mobile app, you can use DynamoDB defined annotations to map client side classes to DynamoDB tables. For this example, we will create a mapping class called Book which will have the same fields as the DynamoDB table and Get and Set method for each field.
Next you will simple build a book object and set the required fields.
To save the object to DynamoDB, you will simply use DynamoDBObjectMapper save(..) method
To update the item again, simply update the fields in the object and call save(..) again.
And finally to load another book, you can call the DynamoDBObjectMapper load(..) method and use the hash key. In this case we have set the id as the hash key.
Now lets talk about shared media or you app assets.
Native mobile apps allow image files and other content assets to be bundled with the app code, which typically means that updates to those assets entails deploying a new version of the app to your end users. In addition, bundling your app assets also increases the size of the apk or app binary. Having cloud storage, enables you to dynamically load content when your app starts.
Depending on the use case, you may also want to store or back up your users images, videos, or other files in cloud storage as well.
You can do all this without having any backend using Amazon S3.
Amazon S3 is the storage for the internet that provides highly scalable, and low-latency data storage infrastructure at very low costs. It allows you to store any kind of data – images, videos, blobs etc.
When it comes to accessing Amazon S3 from a mobile device, we provide a mobile optimized connector can Amazon S3 Transfer Manager.
The Amazon S3 Transfer Manager makes it easy to access S3 from Mobile Apps while optimizing for performance and reliability. It hides the complexity behind a simple API. Supports high level functions like Pause, cancel and resume. You can track progress of the file transfer. A cool feature of S3 Transfer Manager is that it inherently supports multi-part uploads. i.e whenever possible, uploads are broken up into multiple pieces, so that several pieces can be sent in parallel to provide better throughput.
Today push notifications is the way to get users back to the app when the they are not using the app. It is an extremely important functionality to drive engagement, retention and improve the overall user experience. Customers tell us that working with different push notifications services is painful. They have to maintain server side database of tokens issued by apple and android, and maintain the infrastructure and different APIs. Moreover, sending push notifications to different parts of the world for example china, where there are more than 200 android appstores is extremely hard.
Each platform works differently, and push gets even more complex as you scale to support millions of devices.
Amazon SNS Mobile Push is a managed, scalable, cross-platform push intermediary service. It abstracts the complexity of different push notification services and allows developers to send push notifications across different mobile endpoints. You can subscribe to topics and and send messages which are then relayed to apple, google, Windows, or Baidu notifications services
Now lets talk about one of the most important elements of a mobile app – i.e analyzing user behavior
Developers deeply value user analytics and consider it an integral part of their app development process
They want to monitor their most important metrics in a timely manner, and take action quickly
They would like to own their mobile data, just like they do with any other AWS service.
Amazon Mobile Analytics is a service for collecting, visualizing and understanding app usage data at scale.
It is Fast, with reports typically updated within 60 minutes from when data are received.
The service is designed to be scalable to process billions of events per day from million of users
Your data stays confidential: Amazon does not own, share or monetize your data.
5. Mobile Analytics is cross-platform service that works with iOS, Android and Fire OS apps using the AWS Mobile SDK.
1. We have made it easy for our customers to get a feel for the service with a demo app, and easily get started with resources such as tech documentation and user guide
Quick Overview: Track nine pre-selected metrics in a simple to review dashboard to get a quick idea of engagement
Active Users: Track how many users engage with your app daily and monthly and monitor sticky factor to gauge engagement, appeal, and monetization
Sessions: Track how often your app is used on a given day and how often each user opens your app during a day
Retention: Measure the rate at which customers come back to your app on a daily and weekly basis, after first use
Revenue: Track in-app revenue trend data to identify areas for monetization improvement
Custom Events: Track custom defined user actions specific to your app
Sticky factor
User retention is a key indicator to judge the outcome of a marketing campaign, new feature introduction, UX changes, app updates, etc.
We have made it easy to track user retention with four charts, two for daily, and two for weekly retention estimates.
As an example, if you look at the upper right chart, the developer of this app can see that he had ~2,900 new user on June 6th, of which 700 came back on the 7th, 390 came back on the 9th and finally, 230 came back on the 13th.
Custom Events let you track any action taken in your app, giving you an incredibly powerful insight into your user’s experience and behavior.
Custom Events are often used to track events such as
number of Likes/Shares,
app specific events such as frequent song played
in-app purchase events such as transactions per product SKU.
Or under stand player abort rates in a game.
Amazon Kinesis is a fully managed service for real-time processing of streaming data at massive scale.
Amazon Kinesis can collect and process hundreds of terabytes of data per hour from hundreds of thousands of sources, and allowing you to process information in real-time
You can use kinesis to
Processing you application logs
Real-time metrics and reporting
Real-time custom analytics
AWS Mobile SDK provide Amazon Kinesis Recorder. With Kinesis recorder you can reliably record data from mobile device. It batches requests to handle intermittent network connection and enables you to record events even when the device is offline
Lets summarize
We looked at the essential building blocks of a mobile app
User Authentication
Authorizes access to cloud services
Data synchronization
Analytics: User behavior and retention tracking
Cloud storage
Push Notifications
Shared Data
Real-time data streaming
We discussed how AWS helps you in each areas with
Amazon Cognito
AWS identity and Access Management
Amazon Mobile Analytics
Amazon S3
Amazon SNS Mobile Push
Amazon DynamoDB
Amazon Kinesis
And how everything comes together. Integrated SDK providing access to Mobile optimized services and connectors providing compute, storage, networking, analytics and databases in the cloud. All built on AWS global infrastructure available in multiple regions, zones and edge locations.
So the key takeaways are
There are a breadth of services available and you have the flexibility and freedom of choice for the service you want to use based on the use case.
All services are cross-platform and access is optimized for mobile use case
These services are fully integrated in a unified Mobile SDK so you can get started easily.