Building Mobile Apps on AWS (Featuring Amazon Cognito, Amazon Mobile Analytics, Amazon SNS Mobile Push and more) - Jinesh Varia
Upcoming SlideShare
Loading in...5
×
 

Building Mobile Apps on AWS (Featuring Amazon Cognito, Amazon Mobile Analytics, Amazon SNS Mobile Push and more) - Jinesh Varia

on

  • 9,333 views

Build powerful mobile applications using AWS Mobile Services. For the first time, we will discuss how mobile developers can leverage the new cross-platform AWS Mobile Services that we announced today. ...

Build powerful mobile applications using AWS Mobile Services. For the first time, we will discuss how mobile developers can leverage the new cross-platform AWS Mobile Services that we announced today. How they can authenticate and authorize their users using Amazon Cognito, user identity and data synchronization service. We will discuss how Amazon Mobile Analytics service collects, visualizes and understand your mobile app usage at scale, All this is available as a single unified and mobile-optimized easy-to-use SDK so developers can access these new services (and other services like S3, DynamoDB) with just a few lines of code on the client and without the need of owning backend servers. - http://aws.amazon.com/mobile

Statistics

Views

Total Views
9,333
Views on SlideShare
7,524
Embed Views
1,809

Actions

Likes
34
Downloads
293
Comments
2

9 Embeds 1,809

http://www.scoop.it 985
https://twitter.com 749
http://www.slideee.com 30
https://assets.txmblr.com 27
http://cloudhouseblog.tumblr.com 10
https://www.linkedin.com 5
https://tweetdeck.twitter.com 1
http://www.werner.io 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • In todays’ mobile-first cloud-powered world,
  • The moment you have more than one device, the cloud becomes the logical place to do work and store stuff.  AWS provides a great platform for mobile developers regardless of where the device comes from, what operating system it runs, and what a developer wants to do with it. 
  • <br /> <br /> Authenticate Users: Lets start from the users of your app. The most important aspect for you when building a mobile app is to deliver an engaging experience. For that you would want to know who the user is. In most cases you would use third party identity providers like Amazon, Facebook or Google. However, often a login screen proves to be a point of friction, so you would want users to be able to skip any authentication and directly interact with the app. But at the same time when users do decide to login, they expect their preferences, settings, progress to carry over. <br /> <br /> Synchronize Data: Users 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. To make matters more complicated, your app or game may be available across platforms – iOS, Android, FireOS. If that is the case, users would expect their data, preferences, profile etc. 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 iPad <br /> <br /> Store and share assets and media: Appstores generally have a limit on the size of the app that can be downloaded over WAN. You would want to store the app’s assets in a cloud storage so you can reduce the size of the app. In additional may want to store your users data like pictures and video in the cloud. <br /> <br /> Store shared data: Often you would want to store app data e.g settings in form of key-value pairs in NoSQL database and query it for fast access. <br /> <br /> Push Notifications: Coming back to user engagement, 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. <br /> <br /> Analyze App Usage & Track Retention: Once you deploy your app, you would want track how your app is performing. You would want to track the usage of your app and also how well you are able to track 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, etc. <br /> <br /> Analytics User Behavior: You would also want to track user behavior or how users interact with your app. Do they follow the UX flow that you would expect, where would they drop off in your app etc. <br /> <br /> Stream data in real-time: You would want to collect large amount of custom metrics from your app for off-line analysis like click-stream logs. <br /> <br /> Authorized Access: Most importantly you want to provide secure and authorized access to cloud services. <br /> <br /> Now lets see how AWS can help you in each of these areas <br />
  • Such services are fully integrated with the rest of AWS offering, are optimized for mobile use cases, are accessible via a single Mobile SDK and share the same scalable, on-demand, global infrastructure of all our other AWS services. <br />
  • 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. <br /> <br /> AWS Identity and Access Management (IAM) enables you to securely control access to AWS services and resources for your users. <br /> <br /> Amazon Mobile Analytics is a service that lets you easily collect, visualize, and understand app usage data at scale. <br /> <br /> Amazon S3 as you know is cloud storage for the Internet. We make it easy for you to access S3 from your mobile app using a S3 Transfer Manager <br /> <br /> 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 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. <br /> <br /> 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. <br /> <br /> All this is bundled in the AWS Mobile SDK. <br /> <br /> 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. <br /> <br /> <br /> <br />
  • These services are optimized for mobile OS and make it dead easy to get started when using the SDK. They add a lot of functionality for example Kinesis and Analytics automatically buffer records and events to handle intermittent connection. Kinesis support in the SDK, you can directly ingest large amounts of streaming data from around the world to Kinesis Stream which automatically handles shard. SDK is a great wrapper to handle distributed systems issues, such as automatic retries and so on. Our Mobile SDK adds even more functionality above the normal SDK such as resume, cancel in case of S3 etc. <br />
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • Lets understand this in the context of a mobile game app
  • 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 <br /> <br /> 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. <br /> <br /> 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.
  • One of the key benefits of Amazon Cognito is its Identity broker component. It creates a unique identifer and matches it when user’s login with any of the login providers. Developers have the flexibility to choose any login provider, in v1, we support G+, Amazon and Facebook and you can easily integrate using the SDK. <br /> <br /> We focus on users and not login providers and manage the user preferences for that users. <br />   <br /> Implementing AWS security best practices for accessing cloud resources with Amazon Cognito is easy. Amazon Cognito gives each app a set of temporary, limited privilege AWS credentials for each app user to access all AWS services. <br />
  • We have seen that 90% users simply consumers of data and only 10% are actually content creators. Unauthenticated guest users are users just like logged in users. We should focus more on them, build services for them, and treat them like users, not second class citizens. <br /> <br /> Amazon Cognito simplifies the way your application can access AWS resources in a secure manner, following AWS security best practices, even when your application users are not authenticated.  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 other AWS resources, such as Amazon S3 and 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. <br /> <br /> 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. Incorporating AWS security best practices now takes just a few lines of code. <br />
  • 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. <br /> <br /> Amazon Cognito, eliminates the need to embed you AWS credentials in the app. <br /> <br /> 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. <br /> <br /> 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.
  • Architecturally, Amazon Cognito has two parts: Cognito identity Broker and Cognito Sync Store. Users first login with login provider of their choice and App with SDK does the rest. <br /> <br /> In the past, to access cloud services, developers embed aws credentials which is access key id and secret key within the application, this is highly unsecure because it is easy to unip the apk file and get access to keys. <br /> <br /> Now we make it extremely secure by not only create temprory creds that are valid only for one hour but also limiting the access to other data. The users only have access to store and sync in their own dataset. <br /> <br /> Once you get the temp cred, you can access other AWS services like S3 to store video, for example, DynamoDB to store shared data like leaderboards, kinesis to store streaming data logs and so on. <br />
  • Our policy allows access to all
  • We can restrict to the bucket for S3 <br />
  • We can add a restriction by username/id but our policy is for everyone who assumes the role <br />
  • We can add a restriction by username/id but our policy is for everyone who assumes the role <br />
  • As we all know the number of devices per user is 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. <br /> <br /> 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 developers can synchronize application data across an end user’s devices with a single line of code. <br /> <br /> With Amazon Cognito, developers can securely store application data, such as preferences and game state in the AWS cloud. With synchronized application data, developers can give your users a consistent, unified experience on their app across all of their mobile devices. <br /> <br /> Developers can use Amazon Cognito directly from their mobile app without building or maintaining any backend infrastructure. Amazon Cognito handles secure application data storage and sync, enabling them to focus on their application experiences, instead of the heavy lifting of creating and managing a user application data sync solution. <br /> <br /> It manages the complexity of conflict resolution and intermittent network connectivity by managing offline cache ensuring your application can always deliver a great user experience. Each data set in the Amazon Cognito sync store can be synchronized on all devices associated with an identity simply by calling the synchronize () method. <br />
  • One identitypool across advertizers <br /> Cognito id becomes a cookie id <br />
  • SMS international <br /> Push Deliverity stats from Apple <br /> Latency/reliability <br /> SMS verification <br /> Support for inbound SMS <br /> SMS China? <br /> Regions exansion sync <br /> Username and password.
  • Mobile Analytics is a service for collecting, visualizing and understanding app usage data at scale. <br /> Mobile Analytics is Fast, with reports typically updated within 60 minutes from when data are received. <br /> The service free up to XX million events/month (TBD), and scalable to process billions of events per day from million of users <br /> Your data stays confidential: Amazon does not own, share or monetize your data. <br /> 5. Mobile Analytics is cross-platform service that works with iOS, Android and Fire OS apps using our SDK, or with a Connected Device or a Server using the REST API
  • Amazon Analytics is a service for collecting, visualizing and understanding app usage data at scale. The Amazon Analytics service is free , reports are updated within minutes from when data are received, and the data collected are owned by you. It is built to scale with your business and can collect and process billions of events per day from many millions of users. <br /> <br /> It’s a crossplatform services, any device any OS (Android, IOS, FireOS) can send data to Analytics service and see granular reports
  • 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 <br />
  • Quick Overview: Track nine pre-selected metrics in a simple to review dashboard to get a quick idea of engagement <br /> <br /> Active Users: Track how many users engage with your app daily and monthly and monitor sticky factor to gauge engagement, appeal, and monetization <br /> <br /> Sessions: Track how often your app is used on a given day and how often each user opens your app during a day <br /> <br /> Retention: Measure the rate at which customers come back to your app on a daily and weekly basis, after first use <br /> <br /> Revenue: Track in-app revenue trend data to identify areas for monetization improvement <br /> <br /> Custom Events: Track custom defined user actions specific to your app <br /> <br /> Sticky factor <br />
  • User retention is a key indicator to judge the outcome of a marketing campaign, new feature introduction, UX changes, app updates, etc. <br /> We have made it easy to track user retention with four charts, two for daily, and two for weekly retention estimates. <br /> 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. <br /> Custom Events are often used to track social events such as number of Likes/Shares, app specific events such as play progress/song played, and in-app purchase events such as transactions per product SKU. <br /> <br /> Songs played is the custom even per session. Attribute numerical value associated with the data metric. Attribute: Weaponsused sword, how many people used the sword? <br /> <br /> <br /> <br />
  • Bulk update and backin time.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • Today push notifications is the way to get to the app when the user is not using. It is extremely important functionality to drive engagement, retention and overal user experience. Customers tell us that working with diferent push notifications services is painful. They have to maintain serverside database of tokens issued by apple and android, and maintain the infastructure 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. <br />
  • Each platform works differently, and push gets even more complex as you scale to support millions of devices. <br />
  • 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 <br /> <br />
  • Customers love <br /> high scale and <br /> Reliability of SNS <br /> <br /> Fast reliable notification for every <br /> Email received is powered by SNS <br /> <br /> High-profile Startups <br /> trust SNS for their <br /> high-profile launches <br /> <br /> Launched its Android <br /> App with SNS, no <br /> provisioning required <br /> <br /> Mature games increase <br /> retention using SNS <br /> <br /> Advanced targeted <br /> notifications <br /> bring players back into <br /> the game <br /> <br /> <br />
  • We discussed user data, now lets talk about shared data. <br />
  • 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. <br /> <br /> So what is DynamoDB? <br /> <br /> 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. <br /> <br /> 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. <br /> <br /> 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. <br /> <br /> 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. <br /> To save the object to DynamoDB, you will simply use DynamoDBObjectMapper save(..) method <br /> To update the item again, simply update the fields in the object and call save(..) again. <br /> 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.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • draft
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • How to build an app <br /> <br /> 1. Authentication <br /> 2. Authorization <br /> 3. Data Storage and Delivery (Upload and Download) <br /> 4. Data Analytics <br /> 5. Data Synchronization <br /> 6. Push Notifications <br /> 7. Shared Data <br /> 8. Stream real-time data <br /> 9.
  • Such services are fully integrated with the rest of AWS offering, are optimized for mobile use cases, are accessible via a single Mobile SDK and share the same scalable, on-demand, global infrastructure of all our other AWS services. <br />
  • Such services are fully integrated with the rest of AWS offering, are optimized for mobile use cases, are accessible via a single Mobile SDK and share the same scalable, on-demand, global infrastructure of all our other AWS services. <br />
  • Amazon Cognito has a simple pay as you go pricing plan, with no upfront costs. You pay only for what you use.    <br /> <br /> Authenticating users and generating unique identifiers is free with Amazon Cognito. Upon sign-up, new AWS customers receive 10 GB of cloud sync store and 1,000,000 sync operations per month. <br />   <br /> Charges are based on the total amount of data saved in the Amazon Cognito cloud  sync store and the number of sync operations performed. <br /> <br /> Amazon Analytics is almost free with 100 million events/month and just a 50 cents for millionevents there after. <br />

Building Mobile Apps on AWS (Featuring Amazon Cognito, Amazon Mobile Analytics, Amazon SNS Mobile Push and more) - Jinesh Varia Building Mobile Apps on AWS (Featuring Amazon Cognito, Amazon Mobile Analytics, Amazon SNS Mobile Push and more) - Jinesh Varia Presentation Transcript

  • Building Cloud-powered Mobile Apps Now Featuring Amazon Cognito, Amazon Mobile Analytics and more… Jinesh Varia 9/29/2014 © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • How to build a mobile app today?
  • Authenticate users Manage users and identity providers Authorize access Securely access cloud resources Sync user prefs across devices Analyze User Behavior Store and share media Synchronize data Deliver media Send push notifications Store shared data Track active users, engagement Track Retention Stream real-time data Manage funnels, Campaign performances Store user-generated photos Media and share them Automatically detect mobile devices Deliver content quickly globally 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 View slide
  • 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 View slide
  • Cross-platform, Optimized for Mobile User identity & data synchronization service Fast cross-platform Analytics & reporting Service Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push Kinesis Connector DynamoDB Connector S3 Connector SQS ConnectorSES Connector Store any NoSQL data and also map mobile OS specific objects to DynamoDB tables Powerful Cross-platform Push notification service Recorder that can handle intermittent network connection Easily upload, download to S3 and also pause, resume, and cancel these operations Send email reliably from device Access distributed buffering and queuing service
  • 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
  • Authenticate users Manage users and identity providers Authorize access Securely access cloud resources Sync user prefs across devices Analyze User Behavior Store and share media Synchronize data Deliver media Send push notifications Store shared data Track active users, engagement Track Retention Stream real-time data Manage funnels, Campaign performances Store user-generated photos Media and share them Automatically detect mobile devices Deliver content quickly globally 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
  • Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Analyze User Behavior Store and share media Synchronize data AWS Mobile SDK Amazon Mobile Analytics Deliver media Amazon Cognito (Sync) Amazon S3 Transfer Manager Amazon CloudFront (Device Detection) Store shared data Amazon DynamoDB (Object Mapper) Stream real-time data Amazon Kinesis (Recorder) Track Retention Amazon Mobile Analytics Send push notifications Amazon SNS Mobile Push Your Mobile App
  • Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Analyze User Behavior Store and share media Synchronize data AWS Mobile SDK Amazon Mobile Analytics Deliver media Amazon Cognito (Sync) Amazon S3 Transfer Manager Amazon CloudFront (Device Detection) Store shared data Amazon DynamoDB (Object Mapper) Stream real-time data Amazon Kinesis (Recorder) Track Retention Amazon Mobile Analytics Send push notifications Amazon SNS Mobile Push Your Mobile App
  • Authenticate users: Amazon Cognito
  • Amazon Cognito “Your App data is secure, available offline, and kept in sync between devices” Simplifies Identity and Access Management Securely access all AWS services from Mobile device Cross-device and Cross-platform Sync Implement security best practices Synchronize user’s data across devices and platforms Guest Your own Auth Manage users as unique identities across identity providers
  • 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. Helps implement security best practices Securely access any AWS Service from mobile device. It simplifies the interaction with AWS Identity and Access Management Mobile Analytics S3 DynamoDB Kinesis
  • 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 Save Data to the Cloud Save app and device data to the cloud and merge them after login Unique Identifier for Your “Things” “Headless” connected devices can also securely access cloud services. Visitor Preferences Guest Cognito Store EC2 S3 DynamoDB Kinesis
  • Private Beta Customer: Location-aware Music App Use Case: Soundtracker is the first geosocial music network allowing people to listen and share their own music stations. By geolocalizing these stations and synching data across device and across OSs, users will have enhanced user experience that listen to what is being streamed around them, and pick up from where they left off. User Preferences Stations Music Albums Authenticated User Guest
  • Getting Started with Cognito in 3 steps Sign up for AWS Account and login to AWS Management Console Create identitypool for authenticated and unauthenticated users in the AWS Console Download and integrate the Mobile SDK and store and sync user data in a dataset
  • Demo: Amazon Cognito Console
  • 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
  • Amazon Cognito Security Architecture End Users App with AWS Mobile SDK Access Token Pool ID Role ARNs Access to AWS Services Login OAUTH/OpenID Access Token Cognito ID, Temp Credentials Cognito ID (Temp Credentials) DynamoDB Developer Cognito Identity Broker S3 Mobile Analytics Cognito Sync Store AWS Management Console
  • Developer-Authenticated Identities Your own Username And Password Your own user authentication system Several apps prefer to have their own username and password instead of public identity providers for authentication. Easily integrate with existing systems Implement GetOpenIdTokeForDeveloperIdentity() using our server-side SDKs like Java, Python, Ruby etc. Manage mappings easily Cognito manages the mappings across login systems (public or private) using a unique Cognito ID
  • Developer Authenticated Identities Cognito ID (Temp Credentials) DynamoDB End Users Developer App with AWS Mobile SDK Access to AWS Services Cognito Identity Broker Get OpenID Token Username password Cognito ID, Temp Credentials S3 Mobile Analytics Cognito Sync Store AWS Management Console OIDC Token Pool ID Role ARNs User Authentication System (Running on AWS or not) OIDC Token OIDC Token
  • Authorize access: Amazon Cognito + AWS IAM + Fine-grained access control
  • Amazon Cognito (Identity Broker) Identitypool Identity Providers Pool of identities that share the same trust policy Access Policy Access to AWS Services identitypool authenticated identities Unauthenticated Identities AWS IAM Roles AWS Account Web Identity Federation S3 DynamoDB Get Delete Put
  • Access Policy for the IAM Role { "Effect":"Allow", "Action":["s3:*"], "Resource":"*" } { "Effect": ”Deny", "Action": ["dynamodb:*"], "Resource": "*" } { "Effect": "Allow", "Action": [”cognito-sync:*"], "Resource": "*" } Allow Actions: All S3, Sync store Operations Resource: All resources within these services Deny Actions: All DDB Operations Resource: All resources
  • Access Policy Restriction { "Effect":"Allow", "Action":["s3:PutObject","s3:GetObject","s3:DeleteObject", "s3:ListMultipartUploadParts","s3:AbortMultipartUpload"], "Resource":"arn:aws:s3:::BUCKET_NAME/*" } { "Effect":"Allow", "Action":["s3:ListBucket","s3:ListBucketMultipartUploads"], "Resource":"arn:aws:s3:::BUCKET_NAME" } { "Effect": "Allow", "Action": ["dynamodb:GetItem", "dynamodb:Query", "dynamodb:PutItem"], "Resource" : [ "arn:aws:dynamodb:REGION:123456789:table/TABLE_NAME", "arn:aws:dynamodb:REGION:123456789:table/TABLE_NAME/ index/INDEX_NAME" ] } Allow Actions: Certain operations Resource: One bucket, table ..
  • Access Policy Restriction { "Effect":"Allow”, "Action” ["s3:PutObject","s3:GetObject","s3:DeleteObject”,”s3: ListMultipartUploadParts","s3:AbortMultipartUpload"], "Resource":"arn:aws:s3:::BUCKET_NAME/Bob/*" } { "Effect":"Allow", "Action":"s3:ListBucket", "Resource":"arn:aws:s3:::BUCKET_NAME", "Condition":{"StringLike":{"s3:prefix":”Bob/"}} } { "Effect":"Allow", "Action":["s3:ListBucketMultipartUploads"], "Resource":"arn:aws:s3:::BUCKET_NAME" } Allow Actions: Certain operations Resource: Within a bucket with specific prefix (user)
  • Access Policy Restriction (Policy Variables) Allow Actions: All sync operations Resource: Only to that identity { "Effect":"Allow", "Action":"cognito-sync:*", "Resource":["arn:aws:cognito-sync:us-east-1: { "Effect": "Allow”, "Action": ["s3:GetObject”,"s3:PutObject”], "Resource": ["arn:aws:s3::: myBucket/amazon/snakegame/ ${cognito-identity.amazonaws.com:sub}"] } 123456789012:identitypool/ ${cognito-identity.amazonaws.com:aud}/identity/ ${cognito-identity.amazonaws.com:sub}/*"] } Allow Actions: S3 Get/Put operations Resource: Only to a specific part of bucket to that identity
  • Synchronize data across devices : Amazon Cognito (Sync)
  • 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.
  • 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
  • Amazon Cognito Sync Offline: The client SDK manages a local SQLite data store to allow the app to work even when connectivity is not available. Fast: The methods to read and write data only interact with the local SQLite database. Intelligent Sync: The sync method compares the local version of the data to the cloud sync store, pushes up deltas and pulls down new changes. Flexible Conflict resolution: The sync method first reads the changes then writes its local changes to the cloud sync store By default Cognito assumes that the last write wins. Developers can override and implement their own conflict resolution programmatically Local SQLite Cache
  • Amazon Cognito Sync Data Model AWS Account Identitypool identitypool Dataset Pool of identities that share the same trust policy Identity Identity Identity Dataset Dataset Unique identifier across devices, get cached on local devices as well as saved in the cloud 1:n 1:n 1:n Dataset synchronized across devices by simply calling dataset.synchronize() method 1:n Dataset Dataset Key/Value Key-value and sync count
  • Amazon Cognito Sync Data Model - Example AWS Account 1:n Identitypool identitypool 1:n Identity Identity Identity 1:n Dataset Dataset Dataset Developer has two apps: a game and a productivity app User preferences Game state Identitypool1 Productivity App Game App 1:n Dataset Dataset Key/Value
  • 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(){..});
  • 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
  • Demo: Sync user’s game state across devices
  • Amazon Cognito (Identity Broker) AWS Identity and Access Management Analyze User Behavior Store and share media Deliver media Send push notifications Store shared data Track active users, engagement Track Retention Stream real-time data Manage funnels, Campaign performances Store user-generated photos Media and share them Automatically detect mobile devices Deliver content quickly globally 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 Authenticate users Authorize access Synchronize data Amazon Cognito (Sync)
  • Analyze User Behavior: Amazon Mobile Analytics
  • User Analytics Is the Most Adopted Mobile Developer Tool
  • 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.
  • 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
  • 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
  • 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
  • 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
  • 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
  • Integrating Mobile Analytics is super simple Initialize the MobileAnalyticsManager. 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);
  • Integrating Mobile Analytics is super simple Initialize the AWSMobileAnalytics 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
  • Demo: How is my game performing across platforms
  • Store and share media Store user-generated photos Media and share them Deliver media Automatically detect mobile devices Deliver content quickly globally Send push notifications Bring users back to your app by sending messages reliably Store shared data Store and query fast NoSQL data across users and devices Stream real-time data Collect real-time clickstream logs and take actions quickly Your Mobile App Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Synchronize data Amazon Cognito (Sync) Analyze User Behavior Amazon Mobile Analytics Track Retention Amazon Mobile Analytics
  • Store and share media: Amazon S3
  • Amazon S3 Connector: Transfer Manager S3 Connector Multipart upload media (photos, videos, audio) Fault tolerant download (e.g. assets) No backend required Automatic retries Pause, resume, cancel functions Optimized for native OS
  • Amazon S3 Connector: Transfer Manager in Android // 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);
  • Amazon S3 Connector: Transfer Manager in iOS // Creating the transfer manager self.transferManager = [S3TransferManager new]; self.transferManager.s3 = s3client; // Upload image [self.transferManager uploadFile:fileName bucket:bucketName key:objectName]; // Download image [self.transferManager downloadFile:fileName bucket:bucketName key:objectName]; // Pause, Resume, Cancel [self.transferManager pauseAllTransfers]; [self.transferManager resumeAllTransfers]; [self.transferManager cancelAllTransfers];
  • Demo : Download Game Assets
  • Amazon S3 Transfer Manager Send push notifications Bring users back to your app by sending messages reliably Store shared data Store and query fast NoSQL data across users and devices Stream real-time data Collect real-time clickstream logs and take actions quickly Your Mobile App Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Synchronize data Amazon Cognito (Sync) Analyze User Behavior Amazon Mobile Analytics Track Retention Amazon Mobile Analytics Store and share media Deliver media Amazon CloudFront (Device Detection)
  • Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Analyze User Behavior Store and share media Synchronize data AWS Mobile SDK Amazon Mobile Analytics Deliver media Amazon Cognito (Sync) Amazon S3 Transfer Manager Amazon CloudFront (Device Detection) Store shared data Amazon DynamoDB (Object Mapper) Stream real-time data Amazon Kinesis (Recorder) Track Retention Amazon Mobile Analytics Send push notifications Amazon SNS Mobile Push Your Mobile App
  • Send Push Notifications: Amazon SNS Mobile Push
  • 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.
  • Each platform works differently, and push gets even more complex as you scale to support millions of devices. Cloud App Platform Services Mobile Apps
  • 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
  • Developers Love Cross-Platform Features of SNS Customers love high scale and Reliability of SNS Fast reliable notification for every Email received is powered by SNS High-profile Startups trust SNS for their high-profile launches Secret.ly Mature games increase retention using SNS Advanced targeted notifications bring players back into the game Launched its Android App with SNS, no provisioning required Jetpack Joyride Fruit ninja
  • Store Shared Data: Amazon DynamoDB
  • Amazon DynamoDB Connector: Object Mapper High Scores Joe 1500 Anna 800 Bob 750 Joe Anna Bob 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
  • Amazon S3 Transfer Manager Send push notifications Bring users back to your app by sending messages reliably Store shared data Store and query fast NoSQL data across users and devices Stream real-time data Collect real-time clickstream logs and take actions quickly Your Mobile App Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Synchronize data Amazon Cognito (Sync) Analyze User Behavior Amazon Mobile Analytics Track Retention Amazon Mobile Analytics Store and share media Deliver media Amazon CloudFront (Device Detection)
  • Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Analyze User Behavior Store and share media Synchronize data AWS Mobile SDK Amazon Mobile Analytics Deliver media Amazon Cognito (Sync) Amazon S3 Transfer Manager Amazon CloudFront (Device Detection) Store shared data Amazon DynamoDB (Object Mapper) Stream real-time data Amazon Kinesis (Recorder) Track Retention Amazon Mobile Analytics Send push notifications Amazon SNS Mobile Push Your Mobile App
  • Collect real-time click-stream data: Amazon Kinesis Mobile Connector
  • Amazon Kinesis Connector for Mobile Apps Amazon Kinesis Kinesis S3 Redshift enabled Apps on EC2 AWS Mobile SDK For sophisticated User Behavior Analysis Integrated AWS Mobile SDK Generic batching system that handles intermittent network connection and also optimize battery utilization
  • Summary
  • Authenticate users Manage users and identity providers Authorize access Securely access cloud resources Sync user prefs across devices Analyze User Behavior Store and share media Synchronize data Deliver media Send push notifications Store shared data Track active users, engagement Track Retention Stream real-time data Manage funnels, Campaign performances Store user-generated photos Media and share them Automatically detect mobile devices Deliver content quickly globally 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
  • Authenticate users Amazon Cognito (Identity Broker) Authorize access AWS Identity and Access Management Analyze User Behavior Store and share media Synchronize data AWS Mobile SDK Amazon Mobile Analytics Deliver media Amazon Cognito (Sync) Amazon S3 Transfer Manager Amazon CloudFront (Device Detection) Store shared data Amazon DynamoDB (Object Mapper) Stream real-time data Amazon Kinesis (Recorder) Track Retention Amazon Mobile Analytics Send push notifications Amazon SNS Mobile Push Your Mobile App
  • 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
  • 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
  • Get Started for Free! Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push Free Tier: 1 Million push messages every month Free Tier (for first 12 months): 1 Million syncs/month + 10GB of storage for Amazon Cognito Free Tier: 100 Million events every month http://aws.amazon.com/mobile
  • Thank You! Jinesh Varia @jinman jvaria@amazon.com
  • Appendix..
  • Simple and predictable pay as you go pricing Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push Free Tier: 1 Million push messages every month Thereafter: $0.50 for Million notifications delivered $0.50 for Million requests Free Tier (for first 12 months): 1 Million syncs/month + 10GB of storage for Amazon Cognito Thereafter: $0.15 for 10K Syncs $0.15 per GB for storage Free Tier: 100 Million events every month Thereafter: $1.00 per Million events