Learn how to build a powerful iOS app that leverages a variety of AWS services. In this three-hour, demo-heavy workshop, we show how you can build a modern native client app using Apple Swift and the AWS Mobile SDK that uses a number of cross-platform mobile cloud services directly with minimal code on the client. We share best practices for building a highly scalable backend so you can add your own functionality. This is a step-by-step journey where you configure and add components to your architecture, then modify and test your components inside a mobile location-based messaging app. In the end, you will have a mobile app with your own backend consisting of different AWS services including: Amazon Cognito, Amazon Mobile Analytics, Amazon SNS Push Notification, Amazon S3, Amazon CloudFront, Amazon CloudSearch, Amazon DynamoDB, Amazon SQS, and AWS Elastic Beanstalk.
(MBL310) Workshop: Build iOS Apps Using AWS Mobile Services | AWS re:Invent 2014
1.
2.
3.
4.
5.
6.
7.
8. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
Deliver media
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
Automatically detect mobile devices
Deliver content quickly globally
Bring users back to your app by sending
messages reliably
Store and query fast NoSQLdata
across users and devices
Collect real-time clickstream logs
and take actions quickly
Your Mobile App
9.
10. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
AWS Mobile SDK
Amazon Mobile
Analytics
Deliver media
Amazon Cognito
(Sync)
AWS Identity and
Access Management
Amazon Cognito
(Identity)
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
11.
12. Manage authenticated and guest users across identity providers
Guest
Identity Management
Synchronize user’s data across devices and platforms via the cloud
Data Synchronization
Securely access AWS services from mobile devices and platforms
Secure AWS Access
Guest
Your own
Auth
13. Identity
Providers
Unique
Joe Anna Bob Identities
Any Device
Any Platform
Any Service
Helps implement security best
practices
Securely access any AWS service from a
mobile device. It simplifies the interaction with
IAM.
Support Multiple Login Providers
Easily integrate with major login providers for
authentication.
Unique Users vs. Devices
Manage unique identities. Automatically
recognize unique users across devices and
platforms.
Mobile
Analytics
Amazon
S3
DynamoDB Amazon
Kinesis
14. Unique Identifier for Your “Things”
“Headless” connected devices can also
securely access cloud services.
Save Data to the Cloud
Save app and device data to the cloud and
merge them after login.
Guest User Access
Securely access AWS resources and leverage
app features without the need to create an
account or logging in.
Visitor
Preferences
Amazon
Cognito
Sync
Guest
Amazon
EC2
Amazon
S3
DynamoDB
Amazon
Kinesis
15. Set granular access permissions on AWS
resources
Get fine-grained access control to cloud
resources.
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 Amazon Security Token
Service and removes the need of Token
Vending Machine.
Amazon
EC2
Amazon
S3
DynamoDB Amazon
Kinesis
16. •Identity Pool: Pool of app users. Can be shared across apps.
•Identity: An individual user. Consistent across identity providers. Can be a guest user.
•Login: Identifier in a login provider.
AWS Account
Dataset
Identity
Identity
Identity
Dataset
Login
Identity
Pool
1:60
1:n
0:n
17. Sign up for an AWS account and login to the AWS Management Console
Download and integrate the AWS Mobile SDK and store and sync user data in a dataset
Create identitypoolfor authenticated and unauthenticated users in the AWS Management Console
43. People have multiple devices and want to transition between devices. Implementing a user profile that syncs across devices, OS, and apps is hard. It not only has to work when offline, but it must be easy to integrate with existing apps.
47. •Identity Pool: Pool of app users. Can be shared across apps.
•Identity: An individual user. Consistent across identity providers. Can be a guest user.
•Dataset: Per user grouping of data. The most granular level of sync. Up to 1 MB.
•Record: Key-value pair.
AWS Account
Dataset
Identity
Identity
Identity
Dataset
Dataset
Identity
Pool
1:60
1:n
1:20
Dataset
Dataset
Record
1:1024
57. 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.
58. 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
59. 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.
60. 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
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
61. Sign up for an AWS account and create or use an existing Amazon CognitoID in the AWS Management Console
View engagement and session activity reports in the AWS Management Console within minutes
Download and integrate the AWS Mobile SDK with one line of code (Android/FireOS, iOS)
62.
63.
64. 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
65.
66.
67.
68.
69.
70.
71.
72. Amazon S3 Custom
OR
User requests
Edge location
(cache + network optimizations) Origin
Get content Get content
Content Content
How Amazon CloudFrontWorks
73. Dallas (2)
St.Louis
Miami
Jacksonville
Los Angeles (2)
Palo Alto
Seattle
Ashburn (3)
Newark
New York (3)
Dublin
London (2)
Amsterdam (3)
Stockholm
Frankfurt (3)
Paris (2)
Singapore (2)
Hong Kong (2)
Tokyo (2)
Sao Paulo
South Bend
San Jose
Milan
Sydney
Madrid
Seoul
Mumbai
Chennai
Atlanta
Hayward
Rio de Janeiro
Marseille
Warsaw
Osaka
Manila
Taipei
Melbourne
74.
75.
76. Joe
Anna
Bob
High Scores
Joe
1500
Anna
800
Bob
750
DynamoDB Connector: Object Mapper
Simplifies access to DynamoDB in your app
Map client-side classes to DynamoDB tables
Removes the need to transform objects into tables and vice versa
86. Geography
Activity
Product
US –West Coast
Daily Actives
Flapping Bird Rio
Interest
Tier
Segment
49ers
Premium
Top 100 Players
87.
88.
89.
90. •Elastic Beanstalk
–No additional costs, you pay only for the AWS resources you use
–Environment tier
•Web Server (JSON)
•Worker (Amazon SQS)
–Publish with tools you already use
•Eclipse
•Visual Studio
•Git
100. 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.
Manage mappings easily
Cognito manages the mappings across login systems (public or private) using a unique Amazon CognitoID.
Easily integrate with existing systems
Implement GetOpenIdTokeForDeveloperIdentity() using our server-side SDKs like Java, Python, Ruby etc.
110. Authenticate users
Authorize access
Analyze User Behavior
Store and share media
Synchronize data
AWS Mobile SDK
Amazon Mobile
Analytics
Deliver media
Amazon Cognito
(Sync)
AWS Identity and
Access Management
Amazon Cognito
(Identity)
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
111. •AWS Mobile Home
http://aws.amazon.com/mobile
•AWS Mobile Blog
http://mobile.awsblog.com
•Twitter
@awsformobile
•Forums
http://forums.aws.amazon.com
•StackOverflow
http://stackoverflow.com/tags/amazon-web-services
•GitHub
http://github.com/aws/
http://github.com/awslabs/