Amazon EventBridge: Everything serverless developers need to know

A presentation at Serverless Boston Meetup in August 2019 in Boston, MA, USA by James Beswick

Slide 1

Slide 1

BOSTON MEETUP Amazon EventBridge: Everything serverless developers need to know James Beswick Senior Developer Advocate, AWS Serverless Amazon Web Services © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 2

Slide 2

About me • James Beswick • • • • • • Email: jbeswick@amazon.com Twitter: @jbesw Senior Developer Advocate – AWS Serverless Serverless geek Software developer and PM activist Previously: • • • Multiple start-up tech guy Rackspace, USAA, Morgan Stanley, J P Morgan… AWS customer since 2012 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 3

Slide 3

A serverless event bus service for SaaS and AWS services © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 4

Slide 4

Topics for today © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 5

Slide 5

Monoliths and microservices Monolith Microservices Does everything Does one thing © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 6

Slide 6

The end goal And do it faster © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 7

Slide 7

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 8

Slide 8

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 9

Slide 9

Synchronous APIs 😐 😀 201 201 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 10

Slide 10

Architecture v1 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 11

Slide 11

Architecture v2 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 12

Slide 12

Long-term architecture © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 13

Slide 13

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 14

Slide 14

[i-’vent] © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 15

Slide 15

Events are observable, not directed © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 16

Slide 16

What do we do with these arrows? © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 17

Slide 17

Event routers © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 18

Slide 18

Event routers in AWS AWS Service © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Characteristics

Slide 19

Slide 19

Event routers for fan out Event router © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 20

Slide 20

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 21

Slide 21

Synchronous APIs 😀 201 201 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 22

Slide 22

Downstream failures 😡 503 502 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 23

Slide 23

Events are asynchronous © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 24

Slide 24

Asynchronous events 😀 😐 201 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 25

Slide 25

Asynchronous events 😀 😐 201 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 26

Slide 26

But wait, now the customer won’t get their invoice! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 27

Slide 27

Event-driven resiliency 🤬 201 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 28

Slide 28

Inside the invoice service Invoice service © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 29

Slide 29

Inside the invoice service Invoice service © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 30

Slide 30

Inside the invoice service Invoice service X X © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 31

Slide 31

Inside the invoice service Invoice service Event store © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 32

Slide 32

Inside the invoice service Invoice service Event store © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 33

Slide 33

Inside the invoice service Invoice service Event store © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 34

Slide 34

Inside the invoice service Invoice service Event store © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 35

Slide 35

Inside the invoice service Invoice service Event store © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 36

Slide 36

Event stores in AWS AWS Service Characteristics © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 37

Slide 37

Final architecture © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 38

Slide 38

Event routing and storing © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 39

Slide 39

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 40

Slide 40

Bridging the gap AWS Cloud ? © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 41

Slide 41

Polling AWS Cloud © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 42

Slide 42

SaaS web hooks AWS Cloud © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 43

Slide 43

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 44

Slide 44

• Fully managed, pay-as-you-go • Native integration with SaaS providers • 90+ AWS services as sources • 17 AWS services as targets • $1 per million events put into the bus A serverless event bus service for SaaS and AWS services • No additional cost for delivery • Easily build event-driven architectures © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 45

Slide 45

Amazon EventBridge AWS Lambda Default event bus Amazon Kinesis Custom event bus AWS Step Functions Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 46

Slide 46

Amazon EventBridge Event sources AWS Lambda Default event bus Amazon Kinesis Custom event bus AWS Step Functions Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 47

Slide 47

Amazon EventBridge AWS Lambda AWS services Default event bus Amazon Kinesis Custom events Custom event bus AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 48

Slide 48

Amazon EventBridge Event buses AWS Lambda AWS services Default event bus Amazon Kinesis Custom events Custom event bus AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 49

Slide 49

Amazon EventBridge AWS Lambda AWS services Default event bus Amazon Kinesis Custom events Custom event bus AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 50

Slide 50

Amazon EventBridge AWS Lambda “detail-type”: “source”: “aws.partner/example.com/123”, AWS services Default event bus “detail”: Amazon Kinesis “ticketId”: “department”: Custom events Custom event bus “creator”: AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 51

Slide 51

Amazon EventBridge “detail-type”: “source”: “source”: “aws.partner/example.com/123” AWS services AWS Lambda Default event bus “detail”: Amazon Kinesis “ticketId”: “department”: Custom events Custom event bus “creator”: AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 52

Slide 52

Amazon EventBridge “detail-type”: “detail”: “source”: “aws.partner/example.com/123”, AWS services Default event bus AWS Lambda “department”: [“billing”, “fulfillment”] “detail”: Amazon Kinesis “ticketId”: “department”: Custom events”billing” Custom event bus “creator”: AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 53

Slide 53

Amazon EventBridge “detail-type”: [“Ticket AWS Resolved”] Lambda “detail-type”: “Ticket Created” “source”: “aws.partner/example.com/123”, AWS services Default event bus “detail”: Amazon Kinesis “ticketId”: “department”: Custom events”billing”, Custom event bus “creator”: AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 54

Slide 54

Amazon EventBridge Targets AWS Lambda AWS services Default event bus Amazon Kinesis Custom events Custom event bus AWS Step Functions SaaS apps Event source SaaS event bus Rules Additional targets © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 55

Slide 55

EventBridge Integration Partners © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 56

Slide 56

Common use cases © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 57

Slide 57

Onboarding a SaaS event source with EventBridge Your account - 111111111111 AWS account ID 111111111111 AWS Region us-east-1 SaaS partner account © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 58

Slide 58

Onboarding a SaaS event source with EventBridge Your account - 111111111111 SaaS partner account © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 59

Slide 59

Onboarding a SaaS event source with EventBridge Your account - 111111111111 SaaS partner account © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 60

Slide 60

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 61

Slide 61

Thank you! James Beswick Developer Advocate, AWS Serverless jbeswick@amazon.com @jbesw © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.