8. 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
9. 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
10. Generate thumbnails
Keep another database in sync
Process streaming data
Services FunctionsPlatform
Target Action
Kinesis
Stream
DynamoDB
Table
S3
Bucket
32. A B
C
D
E
F
Event-Driven Interactions replacing Distributed Transactions
using Eventual Consistency
Differentiate reads (queries)
from writes (commands),
as in the Command Query
Responsibility Segregation
(CQRS) pattern
command query
40. Using WebSockets instead of Web API to talk to the Back End
WebSockets Back End
AWS
Lambda
User
Client
Application
AWS
IoT
DynamoDB
Table
S3
Bucket
Amazon
Cognito
MQTT or
Device
ShadowMQTT over
WebSockets
41. Server ! Client
{
"id": "...",
"html": "..."
}
{
"js": "..."
}
Client ! Server
{
"cmd": "...",
"data": "..."
}
MQTT Topics
myapp/client/in/{ID}
myapp/client/out/{ID}
Cognito Identity ID ! {ID}1
2
3
4
AWS
Lambda
User
Client
Application
AWS
IoT
DynamoDB
Table
S3
Bucket
Amazon
Cognito
MQTT or
Device
ShadowMQTT over
WebSockets
42. Possible optimisations depending on your data flow
and your acceptable latency
Data
Source
Kinesis
Stream
Kinesis
FirehoseKinesis
Analytics
(augment
& aggregate)
AWS
Lambda
(batch)
S3
Bucket
AWS
Lambda
(file)
Data Streams
Processing
Reference
Data
45. AWS
Lambda
(batch)
User
Client
Application
Using WebSockets instead of Web API to talk to the Back End
Buffering Requests to reduce Lambda invocations
AWS
IoT
Kinesis
Stream
Buffered Back End
For Everything
MQTT or
Device Shadow
Amazon
Cognito
DynamoDB
Table
S3
Bucket
46. User
Client
Application
Using WebSockets instead of Web API to talk to the Back End
Buffering Requests to reduce Lambda invocations
Storing all customer interactions for further analysis
AWS
IoT
Kinesis
Firehose
Buffered Back End
Saving Interactions
MQTT or
Device Shadow
Amazon
Cognito
AWS
Lambda
(file)S3
Bucket
DynamoDB
Table
48. To receive events from everywhere on the Internet
Webhooks are callbacks for the Web
AWS
Lambda
Amazon
API Gateway
InternetService
HTTP(S) GET or POST to https://domain/SOURCE/RANDOM-HOOK
Webhook
Other AWS
Services
Other public
APIs
AWS
KMS
Secrets &
Credentials
49. To generate events
for repositories
that don’t support
AWS Lambda natively
Log
Monitor
AWS
Lambda
AWS
Lambda
AWS
Lambda
Amazon
SNS
Kinesis
Stream
Log
FilesExternal
Application
Log Monitor
CloudWatch
Logs or Metrics
AWS
Lambda
50. S3 object auto compress
S3 bucket per prefix statistics
DynamoDB provisioned throughput dynamic scaling
DynamoDB item support for geohash
Relational / NoSQL data synchronisation
Service discovery
. . .
Extending Services with Your Own Functionalities
53. 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
Functions
User
Resources
Basic
features
M
edia
Sharing
App
54. 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
Functions
User
Resources
Event-driven
design
M
edia
Sharing
App
55. 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
Functions
User
Resources
Understanding
the overall flow
M
edia
Sharing
App
56. Client
Application
Get Content Index
(S3 API)
Get Content
and Thumbnails
(S3 API)
Upload Content
with Metadata
(S3 API)
Update Content
Metadata
(DynamoDB API)
Get Content Metadata
(DynamoDB API)
S3
Bucket
DynamoDB
Table
Build Thumbnails
(Lambda function)
Update
Content Index
(Lambda function)
Extract and Update
Metadata
(Lambda function)
Event:
new or
updated
file
Event:
new or updated
content metadata
User
Choosing
the technology
M
edia
Sharing
App
57. Client
Application
Get Content Index
(S3 API)
Get Content
and Thumbnails
(S3 API)
Upload Content
with Metadata
(S3 API)
Update Content
Metadata
(DynamoDB API)
Get Content Metadata
(DynamoDB API)
S3
Bucket
DynamoDB
Table
Build Thumbnails
(Lambda function)
Update
Content Index
(Lambda function)
Extract and Update
Metadata
(Lambda function)
Event:
new or
updated
file
Event:
new or updated
content metadata
User
Amazon
Cognito
Defining
the security model
M
edia
Sharing
App
58. Client
Application
Get Content Index
(S3 API)
Get Content
and Thumbnails
(S3 API)
Upload Content
with Metadata
(S3 API)
Update Content
Metadata
(DynamoDB API)
Get Content Metadata
(DynamoDB API)
S3
Bucket
DynamoDB
Table
Build Thumbnails
(Lambda function)
Update
Content Index
(Lambda function)
Extract and Update
Metadata
(Lambda function)
Event:
new or
updated
file
Event:
new or updated
content metadata
User
Amazon
Cognito
From the features
viewpoint…
M
edia
Sharing
App
59. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
buildThumbnails
(Lambda function)
updateContentIndex
(Lambda function)
extractAndUpdateMetadata
(Lambda function)
Event:
new or
updated
file
Event:
new or updated
content metadata
User
Amazon
Cognito
Amazon S3
Amazon DynamoDB
AWS Lambda
…To the technology
viewpoint
M
edia
Sharing
App
60. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
buildThumbnails
(Lambda function)
updateContentIndex
(Lambda function)
extractAndUpdateMetadata
(Lambda function)
Event:
new or
updated
file
Event:
new or updated
content metadata
User
Amazon
Cognito
Amazon S3
Amazon DynamoDB
AWS Lambda
Some events
are correlated
M
edia
Sharing
App
61. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
contentUpdated
(Lambda function)
buildThumbnails
extractAndUpdateMetadata
updateContentIndex
(Lambda function)
Event:
new or
updated
file
User
Amazon
Cognito
Amazon S3 AWS Lambda
Amazon DynamoDB
Event:
new or updated
content metadata
Some functions
can be tied together
M
edia
Sharing
App
62. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
contentUpdated
(Lambda function)
buildThumbnails
extractAndUpdateMetadata
updateContentIndex
(Lambda function)
Event:
new or
updated
file
User
Amazon
Cognito
Amazon S3 AWS Lambda
Amazon DynamoDB
Event:
new or updated
content metadata
What if I want to
delete content?
M
edia
Sharing
App
63. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
contentUpdated
(Lambda function)
buildThumbnails
extractAndUpdateMetadata
deleteMetadata
updateContentIndex
(Lambda function)
Event:
new, updated,
or deleted
file
User
Amazon
Cognito
Amazon S3 AWS Lambda
Amazon DynamoDB
DELETE Object
S3 API
Event:
new or updated
content metadata
REST to the rescue,
the events flow is
almost unchanged
M
edia
Sharing
App
64. Client
Application
GET Object
S3 API
PUT Object
S3 API
UpdateItem
DynamoDB API
GetItem
DynamoDB API
S3
Bucket
DynamoDB
Table
contentUpdated
(Lambda function)
buildThumbnails
extractAndUpdateMetadata
deleteMetadata
updateContentIndex
(Lambda function)
Event:
new, updated,
or deleted
file
User
Amazon
Cognito
Amazon S3 AWS Lambda
Amazon DynamoDB
DELETE Object
S3 API
Event:
new or updated
content metadata
From 8 functions to 2,
using 5 native
API calls
M
edia
Sharing
App
66. Developers can benefit from:
event-driven design
architectural patterns
integrating new products
architecture simplification
customization of the platform
Serverless Architectures are not just simplifying Operations