serverless: an update from the field...api gateway cache api gateway cloudwatch lambda functions ec2...

68
Serverless: An Update From the Field Danilo Poccia, Technical Evangelist @danilop danilop

Upload: others

Post on 11-Jun-2020

35 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Serverless: An Update From the Field

Danilo Poccia, Technical Evangelist @danilop

danilop

Page 2: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Virtual Machines Containers Functions

Page 3: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AMI Hours to Months Patching Multi-Threaded Multi-Task

Per VM Per Hour

The World Of Virtual Machines

Page 4: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Container File Minutes to Days Versioning Multi-Threaded Single-Task

Per VM Per Hour

The World Of Containers

Page 5: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Code Microseconds to Seconds

Versioning Single-Threaded Single-Task

Per Memory/Second Per Request

Free Tier

The World of Lambda Functions

Page 6: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

No server is easier to manage than no server

Serverless Computing

Page 7: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Low Cost

SecuritySimplicity Reliability

Scalability Low Latency

S3: Simple By Name, Simple By Nature

Page 8: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Mobile Apps

Websites

Services

Internet

API Gateway Cache

API Gateway

CloudWatch

Lambda Functions

EC2 Endpoints

Any Other Endpoint

Amazon API Gateway

Page 9: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Building An Infinitely Scalable Online Recording CampaignFor David Guetta & UEFA

Page 10: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable
Page 11: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Credit: Gerry Cranham/Fox Photos/Getty Images http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

Page 12: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Credit: Gerry Cranham/Fox Photos/Getty Images http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

1939 London Underground

Page 13: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSIoT

KinesisStream

AWSLambda

DynamoDBTable

S3Bucket

Page 14: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Name

Email

Create New User

Submit

Check the “Name” syntax is right (only letters and spaces)

Check the “Email” syntax is right ([email protected])

Create the new user using provided Name and Email

User Interface Actions

Page 15: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Name

Email

Create New User

Submit

Check the “Name” syntax is right (only letters and spaces)

Check the “Email” syntax is right ([email protected])

Create the new user using provided Name and Email

User Interface ActionsObservers

Target Action

Page 16: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Generate thumbnails

Keep another database in sync

Process streaming data

Services FunctionsPlatform

Target Action

KinesisStream

DynamoDBTable

S3Bucket

Page 17: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

area = length x widtharea = length x width

Page 18: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Procedural Programming“This is a function!”

area = length x widtharea = length x width

Page 19: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Procedural Programming“This is a function!”

Reactive Programming“This is data binding!”

area = length x widtharea = length x width

Page 20: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

Event-Driven DesignA triggers B

orB is caused by A

Page 21: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

New Services (C, D)are triggered by B

Page 22: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

?

?

What triggersnew services (E, F)?

What is causing E and F?

Page 23: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

New Services (E, F)are triggered by C

Page 24: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

It can be cyclic

Think ofacknowledgements

Page 25: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

Each servicehas local visibility

Page 26: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

What I need to know(input events)

Page 27: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

What I need to do(internal logic)

Page 28: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

Who I need to notify(output events)

Page 29: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

Who I need to notify(output events)

What I need to know(input events)

What I need to do(internal logic)

Page 30: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Distributed Data FlowVs

Centralised Workflow

Page 31: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

ChoreographyVs

Orchestration

Page 32: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Distributed Systems

Page 33: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Monolith

Service

Service

μ

μ

μ

space (distribution, mobility)

time(

conc

urre

ncy,

late

ncy)

μ

μ

μ

μ

Distributedin Time and Space

[Jonas Bonér]

Page 34: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

“…a diagram oftwo microservices

and their shared database”

Page 35: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A

C

I

D

tomic

onsistent

isolated

urable

Page 36: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A

C

I

D

tomic

onsistent

isolated

urable

A

C

I

D

ssociative

commutative

dempotent

istributed

ACID 2.0

Page 37: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

A B

C

D

E

F

Event-Driven Interactions replacing Distributed Transactionsusing Eventual Consistency

Differentiate readsfrom writes (commands),

as in the Command QueryResponsibility Segregation

(CQRS) pattern

Page 38: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Customers Orders

Warehouse Deliveries

Payments

Catalog

Event-Driven Interactions replacing Distributed Transactionsusing Eventual Consistency

Page 39: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Responsive

ResilientElastic

Message Driven

The Reactive Manifesto

Page 40: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

The Reactive Manifesto

Asynchronouscommunicationis not enforced

by serverless architectures

Responsive

ResilientElastic

Message Driven

Page 41: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Serverless Architectural Patterns

Page 42: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambdaUser Client

Application

Back End for a Web (HTML/JavaScript) or Mobile AppCalling the Lambda API directly

Web or Mobile Back End

DynamoDBTable

S3Bucket

AmazonCognito

Page 43: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambda

AmazonCognito

User ClientApplication

OAuth JWT

AmazonAPI Gateway

(HTTPS)

Back End for a Web (HTML/JavaScript) or Mobile AppUsing an API Gateway for authentication and decoupling

Web or Mobile Back EndVia API Gateway

DynamoDBTable

S3Bucket

Page 44: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambdaUser Client

Application

Using WebSockets instead of Web API to talk to the Back End

AWS IoT(MQTT over

WebSockets)

WebSockets Back End

DynamoDBTable

S3Bucket

AmazonCognito

MQTT orDevice

Shadow

Page 45: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Possible optimisations depending on your data flowand your acceptable latency

DataSource

KinesisStream

KinesisFirehoseKinesis

Analytics(improve & aggregate)

AWSLambda(batch)

S3Bucket

AWSLambda

(file)

Data Streams Processing

Page 46: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambda(batch)

AmazonCognito

User ClientApplication

Buffering Requests to the Back End to reduce Lambda invocations

KinesisStream

Buffered Back EndFor Mobile

AmazonSNS

DynamoDBTable

S3Bucket

Page 47: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambda(batch)

User ClientApplication

Using WebSockets instead of Web API to talk to the Back EndBuffering Requests to reduce Lambda invocations

AWS IoT(MQTT over

WebSockets)KinesisStream

Buffered Back EndFor Everything

MQTT orDevice Shadow

AmazonCognito

DynamoDBTable

S3Bucket

Page 48: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

User ClientApplication

Using WebSockets instead of Web API to talk to the Back EndBuffering Requests to reduce Lambda invocations

Storing all customer interactions for further analysis

AWS IoT(MQTT over

WebSockets)Kinesis

Firehose

Buffered Back EndSaving Interactions

MQTT orDevice Shadow

AmazonCognito

AWSLambda

(file)S3

Bucket

DynamoDBTable

Page 49: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

AWSLambda

DynamoDBTable

User ClientApplication

AmazonAPI Gateway

(HTTPS)

S3 Bucket(Website HostingRouting Rules)

For example, to generate image thumbnails on the first request,S3 LifeCycle Rules can delete content after N days

Using Amazon S3 asa Dynamic CacheAmazon

Cognito

Page 50: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

To receive events from everywhere on the Internet

Webhooks are Callbacks for the Web

AWSLambda

AmazonAPI Gateway

InternetService

HTTP(S) GET or POST to https://domain/SOURCE/RANDOM-HOOK

Webhook

Other AWSServices

Page 51: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

To generate eventsfor repositories

that don’t supportAWS Lambda natively

LogMonitor

AWSLambda

AWSLambda

AWSLambda

AmazonSNS

KinesisStream

LogFilesExternal

Application

Log Monitor

CloudWatchLogs or Metrics

AWSLambda

Page 52: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

S3 object auto compress

S3 bucket per prefix statistics

DynamoDB provisioned throughput dynamic scaling

DynamoDB item support for geohash

Service Discovery

. . .

Extending Services with Your Own Functionalities

Page 53: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Serverless === Architecture Simplification

Page 54: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Serverless === Architecture Simplification

Media Sharing App

Page 55: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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

ResourcesEvent-drivendesign

MediaSharing App

Page 56: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Client Application

Get Content Index (S3 API)

Get Content and Thumbnails

(S3 API)

Upload Contentwith 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

Choosingthe technology

MediaSharing App

Page 57: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Client Application

Get Content Index (S3 API)

Get Content and Thumbnails

(S3 API)

Upload Contentwith 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

Addingimplementation

details

MediaSharing App

Page 58: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Client Application

Get Content Index (S3 API)

Get Content and Thumbnails

(S3 API)

Upload Contentwith 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 featureviewpoint…

MediaSharing App

Page 59: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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

MediaSharing App

Page 60: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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 LambdaSome eventsare correlated

MediaSharing App

Page 61: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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 functionscan be tied together

MediaSharing App

Page 62: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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 todelete content?

MediaSharing App

Page 63: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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 isalmost unchanged

MediaSharing App

Page 64: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

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

MediaSharing App

Page 65: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Serverless Architectures are not just simplifying Ops

Page 66: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Devs can benefit from:

event-driven design

architectural patterns

integrating new products

architecture simplification

customization of the platform

Serverless Architectures are not just simplifying Ops

Page 67: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Build Apps With Services,Not Servers

Serverless Architectures are not just simplifying Ops

Page 68: Serverless: An Update From the Field...API Gateway Cache API Gateway CloudWatch Lambda Functions EC2 Endpoints Any Other Endpoint Amazon API Gateway. Building An Infinitely Scalable

Thank you

@danilop danilop