The presentation done for DevNexus about Mobile Cloud Services. Presentation explores and demos services that help you scale your Mobile development to new heights by including Cloud as an integrated part of mobile development.
2. What we will Discuss in this Session
• Cloud Enabled Mobile Dev
• Benefits of Cloud Mobile Development
• Overview of Cloud Services Offerings
• Demo:
• AWS Mobile Hub and AWS Services
• Code Walkthrough
• AWS Mobile Services Overview
• Building Mobile apps using AWS
• Scenarios
• Key features
3. Benefits: Cloud Enabled Mobile Development
User Auth & Identity
Capabilities
Sign-up/Sign-in
User Data synchronization
Social Logins
Offload Logic Processing
Store app assets ex. media files
Upload/Download w/Caching
Mobile App Analytics
Artificial Intelligence
Voice Recognition
Facial Recognition
Text to Speech
Ease in add Push Notifications
Individuals
Groups of users
Device Testing
4. Getting Your Head In the Clouds
Overview of Cloud Services for Mobile
PSA: I will NOT be making ANY Comparisons or
Reviews of the Cloud Platforms.
Only providing public info On Cloud Services Options
AWS Mobile Services
Google
Firebase
Azure App Services
9. AWS for Mobile App development
User authN and authZ
Analyze user behavior
Store and share media
Synchronize data
Deliver media
Amazon Cognito
(Sync)
Amazon Cognito
IAM
(access control)
Amazon S3
Amazon CloudFront
Store data
Amazon DynamoDB
Amazon RDS
Track retention
Amazon Pinpoint
Send push notifications
Amazon SNS Mobile Push
Amazon Pinpoint
Run server-side logic
AWS Lambda
Amazon API Gateway
Amazon Lex
Accept conversational input
Amazon Pinpoint
AWS Mobile SDKs
AWS Mobile Hub
Your mobile app
10. AWS Mobile Services:
Everything you need to build Mobile Apps
Mobile Quickstart
Mobile Hub
Mobile Backend
Serverless: Lambda & API Gateway
EC2
ECS
Scalable Data Storage
DynamoDB
Authorization & Access Control
Cognito
Build Voice & Text Experiences
Amazon Lex
Amazon Polly
User Engagement and Analytics
Mobile Analytics
Simple Notification Services
Simple Email Services
Pinpoint
Test on Real Devices
Device Farm
11. AWS Services for Mobile App Development
Cognito
Identity
Device FarmAWS Lambda
API Gateway
Simple Email
Service
Mobile Hub
Android SDK
iOS SDK
JavaScript SDK
DynamoDB
Amazon RDS
S3
CloudFront
Amazon EMR
Kinesis
Redshift
Mobile
Analytics
Mobile App
Development
Serverless
Backend
Identity
Management
Testing and
Dev tools
Data Storage and
Content
Mobile
Analytics
Email +
Push
Analytics and
Big Data
CodeCommit
CodeDeploy
CodePipeline
Cognito
Sync
Xamarin/.NET SDK
12. Architecture: System
Token exchange
Session storage
Dataset sync
Amazon
CloudFront
Amazon
S3 Amazon
DynamoDB
Amazon
RDS
Amazon
Mobile Analytics
Amazon
SNS
Amazon
Cognito
Amazon API
Gateway
AWS
Lambda
Amazon
EC2/Amazon
ECS
Session data
Custom event attributes
Custom metrics
Routing
API Negotiation
Static content
Images
Video
Binary data
Uploads
virtual private cloud
Amazon
Lex
Conversational
input
13. AWS Mobile Services
SDK - Support for Multiple App Types
UnityXamarin React Native (Beta)
iOS Android WindowsJavaScript
15. Mobile Hub auto-provisions mobile services
AWS
IDENTITY AND ACCESS
MANAGEMENT
AMAZON
S3
AMAZON
CLOUDFRONT
AMAZON
COGNITO
AMAZON
Pinpoint
AMAZON
SNS
AWS
DEVICE FARM
AMAZON
DYNAMODB
AWS
LAMBDA
AMAZON
API GATEWAY
16. AWS Mobile Hub
Provisions AWS Services selected
Provides Working Sample Mobile project
Mobile app project includes:
Xcode or Android Studio project
Uses your AWS resources
Example application code
Helper “Glue” code
Software development kits
Detailed integration instructions
17. AWS Mobile Hub:
Enabling your App Development
Native Applications
Hybrid Applications
Web Applications
Objective-C, Swift
Web
View
Native Container
18. Mobile Hub:
Enabling Enterprise mobile apps
Empower mobile workforces and customers to easily
complete tasks via their mobile devices that span multiple
line of business applications
New supporting Mobile Hub features
Email/password sign-in
SAML-based sign-in
SaaS connectors
Custom connectors
Conversational bots
20. AWS Lambda
Run your code without
managing infrastructure
Cost effective and
Efficient
Continuous Scaling and
Monitoring
Easy to develop
and deploy
Run code without provisioning or managing servers.
Pay only for the compute time you consume; No charge when not
running
Execute for virtually any type of application or backend service
Simple: Upload your code; Lambda runs & scale code with high
availability.
Automatically trigger from other AWS services or call directly from
web or mobile app.
21. AWS Lambda Programming Model
Asynchronous processing
Synchronous
request-response
Publish-and-subscribe
messaging
Event Triggers
Queue-based
messaging
Supports multiple
languages
23. Amazon API Gateway
Simplified API
development
Performance at Scale Security Controls Monitor & meter
API activity
Makes it easy for developers to create, publish, maintain, monitor,
and secure APIs at scale.
With a few clicks, create an API that acts as a “front door” for
applications to access data, business logic
Tie API functionality to back-end services from Amazon EC2, AWS
Lambda, or any Web app
Handles traffic management, authorization and access control,
monitoring, and API version managemen for processingconcurrent
API calls
24. Username
Password
Sign In
1. Request with
Bearer Token
API Endpoints
2. Context + Token
403: Denied
3. Policy Decision
403: Allowed
[Integration with Cognito User Pools]
API Gateway
Amazon API Gateway:
Authorize API access using API Gateway
Custom Authorizer
25. AWS Lambda Amazon API Gateway Amazon Cognito
Create your Serverless Microservices on AWS using
28. Amazon DynamoDB
Fast, Consistent
Performance
Highly Scalable
Fine-grained
Access Control
Flexible
Fast and flexible NoSQL database service for applications
Provides consistent, single-digit millisecond latency at any scale
Fully managed cloud database supporting document and key-
value pair storage models
Flexible data model & reliable performance
AWS Lambda integration providing triggers enabling automatic
reaction to data changes
Great fit for mobile, web, gaming, ad tech, IoT
29. Amazon DynamoDB
No SQL Database
Access via Cognito assigned Role
Storing Data in Databases
Relational (RDS)
Create interfaces
REST/GraphQL/JSON-API
API Gateway, ELB/ALB
- Common: ASG behind ELB
using RDS Multi-AZ
Platform HTTP calls
- iOS: NSURLConnection,
NSURLSession, etc.
- Android: HttpClient(),
HttpGet(), etc.
31. Auth & Access Control
Amazon Cognito
AWS Identity and Access Management
32. Identity is mission critical for your applications
Security
Revenue
Generation
Application
Backbone
Know your users
Monitor engagement
with your application
Store and manage
user data
Personalize your users’
experiences
Protect sensitive data
Secure business-
critical processes
User Identity
33. Amazon Cognito Identity
Facebook
Corporate
ID
Etc.
Sign in with
Your User Pools
You can easily and securely add sign-up
and sign-in functionality to your mobile and
web apps with a fully-managed service that
scales to support 100s of millions of users.
Federated Identities
Your users can sign in with third-party
identity providers, such as Facebook and
SAML providers, and you can control access
to AWS resources from your app.
SAML
Sign in
Username
Password
Submit
Or
Start as a
guest
35. Amazon Cognito User Pools:
Comprehensive User Flows
Email or Phone
Number Verification
Forgot Password
User Sign-Up and
Sign-In
Require users to verify their email address or phone number prior to activating
their account with a one-time password challenge
Provide users the ability to change their password when they forget it with a
one-time password challenge
Allow users to sign up and sign in using an email, phone number, or username
(and password) for your application.
User Profile Data Enable users to view and update their profile data – including custom attributes
SMS Multifactor
Authentication
Require users to complete a second factor of authentication by inputting a
security code received via SMS as part of the sign-in flow
Customize these User Flows Using Lambda
Token Based
Authentication
Use JSON Web Tokens (JWTs) based on OpenID Connect (OIDC) and OAuth 2.0
standards for user authentication in your backend
36. Amazon Cognito Federated Identity:
Federate with Third Party Identity Providers
Username
Password
Sign In
SAML
Identity Provider
Example: Active
Directory with ADFS
Amazon Cognito
2. Get AWS credentials
API Gateway
Your APIs
DynamoDB S3
Lambda
39. Amazon Cognito:
Custom User Flows Using Lambda Hooks
Category Lambda Hook Example Scenarios
Custom
Authentication
Flow
Define Auth Challenge Determines the next challenge in a custom auth flow
Create Auth Challenge Creates a challenge in a custom auth flow
Verify Auth Challenge Response Determines if a response is correct in a custom auth flow
Authentication
Events
Pre Authentication Custom validation to accept or deny the sign-in request
Post Authentication Event logging for custom analytics
Sign-Up
Pre Sign-up Custom validation to accept or deny the sign-up request
Post Confirmation Custom welcome messages or event logging for custom analytics
Messages Custom Message Advanced customization and localization of messages
40. Amazon Cognito:
Importing Existing User
Import users into your Cognito user
pool by uploading .csv files
Users will create a new password
when they first sign-in
Each imported user must have an
email address or a phone number
42. Quality Text & Speech
Language Understanding
Built-in integration
with AWS platform
Seamlessly deploy
& scale
Easy
to use
Cost effective
Amazon Lex
Amazon Lex is a service for building conversational interfaces into any
application using voice and text.
Supply example phrases and Lex builds a complete natural language model
Easy-to-use console to guide through process of creating chatbot or building
conversational interfaces
No need to worry about provisioning hardware and managing infrastructure to power
your bot experience as engagement increases
Integration with AWS Services; Lambda, MobileHub, CloudWatch and can easily
integrate with other services including Amazon Cognito, and Amazon DynamoDB
No upfront costs or minimum fees. You are only charged for the text or speech requests
that are made
43. Amazon Lex:
Conversational Interfaces for Mobile Apps
User speaks or types
inputs into app
Mobile App Amazon Lex
Speech Recognition &
Natural Language
understanding
Integration with AWS Services
AWS Lambda:
Business Logic
Amazon Cognito:
Authentication
AWS CloudWatch
Monitoring
User input
Amazon Lex response
Polly TTS
Speech Text
Conversation Engine parses
user input and responds
…..
…..
DynamoDB
SNS
44. Utterances
Spoken or typed phrases that invoke
your intent
BookHotel
Intents
An Intent performs an action in
response to natural language user
input
Slots
Slots are input data required to fulfill
the intent
Fulfillment
Fulfillment mechanism for your intent
Amazon Lex:
Bot structure
45. Out of the box access control for your bot using AWS IAM
Securely consume data stored in Amazon DynamoDB or SaaS
applications like Salesforce
Test your bot-enabled apps using AWS Device Farm
Engage users with Amazon Pinpoint
Amazon Lex:
Integrate a bot with app using Mobile Hub
46. User Engagement and Analytics
Amazon Pinpoint
Amazon Mobile Analytics
Amazon Simple Notification Service
47. Amazon Pinpoint
Mobile User Engagement Platform
Aims to empower customers by providing tools to …
Effectively engage users through personalized push notifications
(Targeted notifications perform 3 times better than generic notifications)
Segment users based on frequency, recency and custom attributes
Optimize customer messaging via A/B testing
Measure and analyze campaign performance
Multi-channel user engagement
48. Mobile Engagement with Amazon Pinpoint
End-User Devices
(via AWS Mobile SDK)
Amazon SNS
Amazon Mobile
Analytics
Push Notifications
App Events
Data Analysis & Export
Engagement Messages
Amazon Pinpoint
Customer
Systems
(via AWS SDK)
Marketers
(via Console)
49. 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
Simply and cost-effectively collect and analyze your application usage data
Data collected are not
shared, aggregated,
or reused.
Amazon Mobile Analytics
50. Assume a Role with Cognito
Create an instance of your
Mobile Analytics Application
Amazon Mobile Analytics
Submitting Events: Android
51. Amazon SNS
Global and Fast
at Massive Scale
Use via Java, Python, PHP,
Node.js, Objective-C, or
.NET
Send Messages to Any
Device or Endpoint
Support for Multiple
Platforms or Frameworks
Send billions of messages
per day with minimal
latencies across the world
Send notifications via mobile
push, email, HTTP, or SMS; or
messages to Amazon SQS or
AWS Lambda
Fast, Flexible, Global Messaging to Any Device or Endpoint
52. Amazon SNS
Cross-Platform
Mobile Push
Internet
Apple APNS
Google GCM
Amazon ADM
Windows WNS and
MPNS
Baidu CP
With Amazon SNS, developers can send push notifications on multiple platforms
and reach mobile users around the world
Amazon SNS Mobile Push
Android Phones and Tablets
Apple iPhones and iPads
Kindle Fire Devices
Android Phones and Tablets in China
iOS
Windows Desktop and Windows Phone
Devices
54. Worldwide SMS
54
200+ Destination Countries and Connectivity to 1100+ Telecom Carriers
Most Connections are “One-Hop”, thereby reducing latency and improving deliverability
Default Opt-In
Frictionless support for Multi-Factor Authentication and One-Time Password use-cases
Optimal Treatment per Traffic Type
Transactional routes optimized for deliverability while Marketing routes optimized for cost
Cost Control
Per-message Price Threshold and AWS Account-level Spend Threshold
Outbound Messaging Only
Inbound message processing for Opt-Out (STOP) or Help (HELP) where required by law
55. 6
Amazon SNS:
Local Restrictions Solved
Message:
11:30 AM
Message:
Gate change alert! Your
flight from Rio de Janeiro
(GIG) to Manaus (MAO)
on Brazilian Airlines flight
#2120 has changed. The
revised departure time
is…
From: NX SC 1223
To: 33 6 78 90 12 34
Envover: Bonjour!
• SMS cannot originate from a
standard number
• Amazon SNS switches
automatically to a ‘pre-approved’
delivery code
Carrier Restriction
France
• Character limit is 157, versus
the 160 world standard
• Amazon SNS concatenates to
ensure full delivery
Carrier Restriction
Brazil
• Promotional messages are
prohibited from 9 PM – 9 AM
• Amazon SNS buffers messages
till the promotional messaging
time window commences.
Carrier Restriction
India
From: 225-631
Don’t forget about
special deals this
summer!
• Transactional Messages require
a pre-registered communication
code
• Amazon SNS converts the
message source to a known
registered communication code
Carrier Restriction
India
From: LM-ADIDAS
Thank You. Your
order# 123ABC has
shipped!
57. Test your apps with AWS Device Farm on real devices
Automated Testing
Test your apps in parallel
against a large collection of
physical devices in the
AWS Cloud
Remote Access
Gesture, swipe, and interact
with devices real time,
directly from your browser
Rich set of automation
Framework support
Automation
AWS Device Farm
58. AWS Device Farm:
Automated Testing
Choose apps, devices and
automation framework
Test your apps against a
choice of real phones and
tablets
Get test results that
pinpoints bugs and
performance issues
59. AWS Device Farm:
Remote Access
Select a device by attributes
such as make, model and
OS version
Device Farm displays the
device’s screen in your
browser
Gesture, swipe and
Interact with the device.
Reproduce customer issues
and test functionality
62. Effective Mobile Engagement at AWS Scale
Increase engagement using both mobile and non mobile data for
segmentation
Segment and
target
Message and
engage
Measure
improvement
Analyze user
behavior
63. Call To Action – Get Started with Mobile Services
AWS Documentation
Mobile: https://aws.amazon.com/mobile/
Serverless: https://aws.amazon.com/serverless/
Lex: https://aws.amazon.com/lex
AWS Mobile SDK
https://aws.amazon.com/mobile/sdk/
GitHub: Mobile Code Examples
https://github.com/awslabs?utf8=%E2%9C%93&q=mobile
Mobile Services Blog:
https://aws.amazon.com/blogs/mobile/