We built event-driven user interfaces for decades. What about bringing the same approach to mobile, web, and IoT backend applications? You have to understand how data flows and what is the propagation of changes, using reactive programming techniques. You can focus on the core functionalities to build and the relationships among the resources you use. Your application behaves similarly to a “spreadsheet”, where depending resources are updated automatically when something “happens”, and is decomposed into scalable microservices without having to manage the infrastructure. The resulting architecture is efficient and cost effective to run on AWS and managing availability, scalability and security becomes part of the implementation itself.
3. Name
Email
Create New User
Submit
Check the “Name” syntax is right
(only letters and spaces)
Check the “Email” syntax is right
(something@some.domain)
Create the new user using
provided Name and Email
User Interface Actions
4. Name
Email
Create New User
Submit
Check the “Name” syntax is right
(only letters and spaces)
Check the “Email” syntax is right
(something@some.domain)
Create the new user using
provided Name and Email
User Interface ActionsObservers
Target Action
16. HTML, CSS, JavaScript
& Multimedia Content
API Calls
Application Back End
Web Browsers
Mobile Apps
IoT Devices
Other Services
Files
Databases
Back End
Logic
17. API Calls
Application Back End
HTML, CSS, JavaScript
& Multimedia Content
Web Browsers
(JavaScript)
Mobile Apps
IoT Devices
Other Services
By using JavaScript,
Web Browsers can behave
like the other clients,
such as Mobile Apps
or IoT Devices
Files
Databases
Back End
Logic
18. API Calls
Application Back End
HTML, CSS, JavaScript
& Multimedia Content
Web Browsers
(JavaScript)
Mobile Apps
IoT Devices
Other Services
Files
Databases
Back End
Logic
19. Client
Application
API Calls
Application Back End
HTML, CSS, JavaScript
& Multimedia Content
The Client Application
can be a Web Browser,
a Mobile App,
an IoT Device,
or another Service
We can now decouple the
back end implementation
from the device
used by our users
Files
Databases
Back End
Logic
20. Client
Application
API Calls
Application Back End
HTML, CSS, JavaScript
& Multimedia Content
The Client Application
can be a Web Browser,
a Mobile App,
an IoT Device,
or another Service
Files
Databases
Back End
Logic
25. Events
(Context)
Events
(Context)
Generated
by AWS
Not generated
by AWS
ContextContextResource
ContextContextResource
Context
Function
Event
AWS Lambda Managed by AWS
Not managed
by AWS
Result
(Optional)
Function
Invocation
Lambda API Call
Resources can Generate more Events
26. Events
(Context)
Events
(Context)
Generated
by AWS
Not generated
by AWS
ContextContextResource
ContextContextResource
AWS Lambda Managed by AWS
Not managed
by AWS
Direct Use
of Resource
For example,
a file is uploaded
or something is written
in a database
AWS Lambda
Function 2
Function 3
Function 1
Events can Trigger more Functions
31. Client
Application
Get Content
Index
Get Content
and Thumbnails
Upload Content
with Metadata
Update Content
Metadata
Get Content
Metadata
Files
(Multimedia)
Database
Build
Thumbnails
Update
Content Index
Extract
and Update
Metadata
Event:
new or
updated
file
Event:
new or updated
content metadata
AWS Lambda
User
Resources
32. Client
Application
Get Content
Index
Get Content
and Thumbnails
Upload Content
with Metadata
Update Content
Metadata
Get Content
Metadata
Files
(Multimedia)
Database
Build
Thumbnails
Update
Content Index
Extract
and Update
Metadata
Event:
new or
updated
file
Event:
new or updated
content metadata
AWS Lambda
User
Resources
Access to AWS services,
such as AWS Lambda,
and the resources
used by your application,
should be protected
33. Get Content
Index
Get Content
and Thumbnails
Upload Content
with Metadata
Update Content
Metadata
Get Content
Metadata
Files
(Multimedia)
Database
Build
Thumbnails
Update
Content Index
Extract
and Update
Metadata
User Mobile
App
34. Get Content
Index
Get Content
and Thumbnails
Upload Content
with Metadata
Update Content
Metadata
Get Content
Metadata
Files
(Multimedia)
Database
Build
Thumbnails
Update
Content Index
Extract
and Update
Metadata
User
Web Browsers
(JavaScript)
42. Client
Application
Amazon
Cognito
1. Using the
Application
2. Send
Identity Pool ID
3. Get Identity ID +
AWS Temp Credentials
for the Unauthenticated Role
All AWS Services,
including
APIs managed
by Amazon
API Gateway
AWS
Services
4. Call AWS Services using
AWS Temp Credentials
User
Amazon Cognito for Unauthenticated Identities
43. Client
Application
Amazon
Cognito
1. Using the
Application
2. Send
Identity
Provider
Credentials
3. Get
Authentication
Token
4. Send
Identity Pool ID +
Authentication Token
6. Get Identity ID +
AWS Temp Credentials
for the Authenticated Role
All AWS Services,
including
APIs managed
by Amazon
API Gateway
AWS
Services
7. Call AWS Services using
AWS Temp Credentials
5. Check
Authentication Token
with Identity Provider
Identity
Provider
User
Amazon Cognito for Authenticated Identities
44. Client
Application
Custom
Authentication
Amazon
Cognito
1. Using the
Application
2. Send
Identity
Provider
Credentials
4. Send
Authentication
Token
to Client 5. Send
Identity Pool ID +
Authentication Token
6. Get Identity ID +
AWS Temp Credentials
for the Authenticated Role
All AWS Services,
including
APIs managed
by Amazon
API Gateway
AWS
Services
7. Call AWS Services using
AWS Temp Credentials
3. Get
Authentication
Token from Cognito
User
Amazon Cognito for Developer Authenticated Identities