This document discusses using AWS services to build a serverless backend for mobile apps. It describes how Amazon Cognito can be used for user authentication, data synchronization across devices, and security. Amazon Mobile Analytics is presented as a way to analyze user behavior in mobile apps. Amazon SNS is highlighted for its ability to send push notifications across platforms. Integrating these services is described as straightforward using the AWS Mobile SDK. The document emphasizes that developers can build full-featured mobile backends without having to manage their own infrastructure.
13. Your
Mobile
App
Authenticate users
Analyze User Behavior
Synchronize data
Amazon Mobile
Analytics
Amazon Cognito
(Sync)
Amazon Cognito
(Identity Broker)
AWS Mobile SDK
Send push notifications
Amazon SNS
Mobile Push
14. Your
Mobile
App
Authenticate users
Authorize access
Analyze User Behavior
Synchronize data
Amazon Mobile
Analytics
Amazon Cognito
(Sync)
Amazon Cognito
(Identity Broker)
AWS Identity and
Access Management
Store shared data
Amazon DynamoDB
(Object Mapper)
Store and share media
Deliver media
Amazon S3
Transfer Manager
Amazon CloudFront
(Device Detection)
Event driven compute
AWS Lambda
AWS Mobile SDK
Send push notifications
Amazon SNS
Mobile Push
15. Improve mobile apps retention with
Amazon Simple Notification Service
Emmanuel Lemoine
CTO & Founder @ Pretty Fun Therapy
16. Pretty Fun Therapy
• We do ”Mobile Social Discovery”
– To bring people together through casual apps
– Because meeting people should be fun
17. Playme!
Dating + Gaming
• Release: May 15, 2014
• Platform: iOS and Android
• Audience: 6k DAU
Filter Browse Play Engage
18. What is Amazon Simple Notification Service?
• Notification service (HTTP/S, Email, SQS, Mobile Push)
• Cross platform for Mobile Push
– Android / iOS / Windows / Baidu / FireOS
• Cross platform “Native Push“ handler
19. Why do we use it?
• “Social app” means “users engagement”
Without SNS:
Hey, how
are you?
DynamoDB
20. Why do we use it?
• “Social app” means “users engagement”
With SNS:
Hey, how
are you?
DynamoDB SNS
Fine, what
about u?
Rentention booster
UX enhancer
21. What does SNS do for us?
• PFT uses SNS for Native Push purpose
• SNS acts as an intermediate between our App and providers’ Native
Push System (Only one integration to build)
• SNS is also like a database of our users’ device identifier
Cross platform devices
Register
SNS
UserId: 1
DeviceToken: ecaffa86334b6885359…
Platform: APNS
UserId: 2
DeviceToken: APA91bHpUYDrDRlNA…
Platform: GCM
UserId: 1
DeviceToken: addcea86334b6885359…
Platform: APNS
22. What does SNS do for us?
• PFT uses SNS for Native Push purpose
• SNS acts as an intermediate between our App and providers’ Native
Push System (Only one integration to build)
• SNS is also like a database of our users’ device identifier
"SNS rocks!"
Android?
iOS?
GCM
APNS
25. Pricing ?
Amazon SNS
Mobile Push
Free Tier:
1 Million push messages every
month
15 GB for all free tier services
26. What did we gain using SNS ?
Low Cost +20% day 1 user retention
Building the app faster
with less maintenance
27. Your
Mobile
App
Authenticate users
Analyze User Behavior
Synchronize data
Amazon Mobile
Analytics
Amazon Cognito
(Sync)
Amazon Cognito
(Identity Broker)
AWS Mobile SDK
Send push notifications
Amazon SNS
Mobile Push
29. Amazon Cognito
Cross-device and
Cross-platform Sync
Securely access all
AWS services from
Mobile device
Simplifies Identity and
Access Management
Implement security best
practices
“Your App data is secure, available offline, and kept in sync between devices”
Synchronize user’s data
across devices and
platforms
Manage users as
unique identities across
identity providers
Guest Your own
Auth
31. Amazon Cognito Security Architecture
End Users
App with
AWS Mobile
SDK
Access
to AWS
Services
Login OAUTH/OpenID
Access Token
Cognito ID,
Temp
Credentials
Access
Token
Pool ID
Role ARNs
Cognito ID
(Temp
Credentials)
DynamoDB
Cognito Identity
Broker
S3
Mobile Analytics
Cognito Sync
Store
41. Concrete Software builds cross platform mobile games
With Amazon Cognito, We
can build games much faster
and provide great user
experience to our customers.
Keith A. Pichelman
CEO, Concrete Software
”
“ • Provide a seamless user experience across devices
and platforms to our users.
• Store save games in the cloud and synchronize them
across all of a user’s devices without creating or
hosting a backend.
The Challenge
The solution
• Amazon Cognito helps us securely access our AWS
resources.
• Cognito Sync gives us flexibility to save data in the
cloud, and cache it on a user’s devices, without
managing any backend infrastructure.
42. Integrating Cognito Sync functionality is fast
Initialize the CredentialsProvider and CognitoClient
Call synchronize on the dataset
Create or open Dataset and Add Key Values
provider = new CognitoCachingCredentialsProvider (context, AWS_ACCOUNT_ID,
COGNITO_POOL_ID, COGNTIO_ROLE_UNAUTH, COGNITO_ROLE_AUTH, Regions.US_EAST_1);
cognito = new CognitoSyncManager (context, Regions.US_EAST_1, provider);
dataset.synchronize(new SyncCallback(){..});
cognito.openOrCreateDataset(datasetName);
dataset.put(key, value);
43. Integrating Cognito Sync functionality is fast
Initialize the AWSCognitoSyncClient
Call synchronize on the dataset
Create or open Dataset and Add Key Values
DataSet *dataset = [syncClient openOrCreateDataSet:@"myDataSet"];
NSString *value = [dataset readStringForKey:@"myKey"];
[dataset putString:@"my value" forKey:@"myKey"];
AWSCognitoSyncClient *syncClient = [[AWSCognitoSyncClient alloc]
initWithConfiguration: configuration];
[dataset synchronize];
iOS
45. 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.
46. Amazon Mobile Analytics
Scalable and Generous
Free Tier
Focus on metrics that
matter. Usage reports
available within 60 minutes
of receiving data from an
app
Fast
Scale to billions of events
per day from millions of
users.
Own Your Data
“Easily collect, visualize and understand your app usage data at scale”
Data collected are not
shared, aggregated, or
reused
47. Specific metrics related to your app and your business
Track the number of
Likes/Shares, per article,
in a news app
Understand player
abort rates per level,
in a game
Number of songs played,
per user session, in a
music app
In-app item popularity in
a shopping app
Track Custom Events
Active users / Sessions / Revenue / Retention
Track Behavior Events
48. Integrating Mobile Analytics is fast
Initialize the MobileAnalyticsManager. That’s it! Get Session
Activity in the AWS Management Console.
For Custom Events activity reports, add events.
Add OnResume() and OnPause()
private static MobileAnalyticsManager analytics;
analytics = MobileAnalyticsManager.getOrCreateInstance(
this.getApplicationContext(),"yourCompany.yourAppId",
Regions.YOUR_REGION, config, cognitoProvider );
EventClient eventClient = analytics.getEventClient();
MobileAnalyticsEvent visitEvent = eventClient.createEvent("speedSet");
eventClient.recordEvent(visitEvent);
analytics.getSessionClient().resumeSession();
analytics.getSessionClient().pauseSession();
Analytics.getEventClient().submitEvents();
49. Integrating Mobile Analytics is fast
Initialize the AWSMobileAnalytics object. That’s it! Get Session
Activity in the AWS Management Console.
Submit the event. If we don't call submitEvents, events
will automatically be submitted at periodic intervals.
Create add Custom Events
[eventClient submitEvents];
id<AWSMobileAnalyticsEventClient> eventClient =
analytics.eventClient;
id<AWSMobileAnalyticsEvent> level1Event = [eventClient
createEventWithEventType:@"level1Complete"];
AWSMobileAnalytics* analytics = [AWSMobileAnalytics
defaultAWSMobileAnalyticsWithIdentifier:@"someuniqueid"];
iOS
58. Amazon Cognito Amazon Mobile
Analytics
Amazon SNS
Mobile Push
Free Tier:
1 Million push messages
every month
Free Tier:
1 Million syncs/month +
10GB of storage for Amazon
Cognito
Free Tier:
100 Million events every
month
Get Started for Free!
http://aws.amazon.com/mobile