Slide 1

Slide 1 text

Opsio internal workshop 2018-11-23 @gunnargrosch Stockholm AWS Meetup 2019-10-16 Gunnar Grosch @gunnargrosch Event-driven serverless applications with Amazon EventBridge

Slide 2

Slide 2 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 3

Slide 3 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 4

Slide 4 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 5

Slide 5 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 6

Slide 6 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 7

Slide 7 text

GUNNAR GROSCH • Evangelist and Co-founder at Opsio • Almost 20 years of experience in the industry with a background in development, operations, sales and management • Helping the community as an organizer of AWS User Groups, AWS Community Day Nordics, ServerlessDays Stockholm and Serverless Meetups • Advocate for serverless and chaos engineering @gunnargrosch

Slide 8

Slide 8 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 9

Slide 9 text

“Serverless allows you to build and run applications and services without thinking about servers. It eliminates infrastructure management tasks such as server or cluster provisioning, patching, operating system maintenance, and capacity provisioning.” Amazon Web Services @gunnargrosch

Slide 10

Slide 10 text

“… without thinking about servers …” @gunnargrosch

Slide 11

Slide 11 text

“… servers …” @gunnargrosch

Slide 12

Slide 12 text

“… servers …” @gunnargrosch

Slide 13

Slide 13 text

@gunnargrosch

Slide 14

Slide 14 text

WHAT IS SERVERLESS? • No infrastructure provisioning – no management • Automatic scaling • Pay for value • Highly available and secure @gunnargrosch

Slide 15

Slide 15 text

“Serverless technologies have the ability to truly democratize applications. A child in their bedroom can build and operate an application that serves millions of users. Serverless distills applications down to pure business value which unlocks unprecedented potential in application developers.” Richard Boyd @gunnargrosch

Slide 16

Slide 16 text

THE AWS SERVERLESS PLATFORM Compute @gunnargrosch AWS Lambda AWS Fargate Amazon Simple Storage Service Amazon Elastic File System Amazon DynamoDB Amazon Aurora Serverless Storage Data stores

Slide 17

Slide 17 text

Amazon Simple Notification Service THE AWS SERVERLESS PLATFORM Integration @gunnargrosch API Proxy Analytics Amazon Simple Queue Service AWS AppSync Amazon EventBridge Amazon Kinesis Amazon Athena Orchestration AWS Step Functions Amazon API Gateway

Slide 18

Slide 18 text

”Stop calling everything serverless” Jeremy Daly @gunnargrosch

Slide 19

Slide 19 text

SIMPLE WEB SERVICE @gunnargrosch AWS Lambda Amazon DynamoDB Amazon API Gateway Client Synchronous

Slide 20

Slide 20 text

Amazon Simple Storage Service SIMPLE S3 ”THUMBNAIL” TRIGGER @gunnargrosch AWS Lambda Client Asynchronous

Slide 21

Slide 21 text

BUILDING SERVICES @gunnargrosch Function Function Service Service

Slide 22

Slide 22 text

BUILDING SERVICES @gunnargrosch UpdateOrder CreateOrder Database Order Service

Slide 23

Slide 23 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 24

Slide 24 text

WHAT IS AN EVENT? Event [ih-vent] (dictionary.com) • something that happens or is regarded as happening; an occurrence, especially one of some importance • something that occurs in a certain place during a particular interval of time • the outcome, issue or result of anything @gunnargrosch

Slide 25

Slide 25 text

WHAT IS AN EVENT? • Events are facts: The image was uploaded • Events are temporal: The image was uploaded 2019-10-16 18:34:21 • Events are immutable: The image was uploaded 2019-10-16 18:34:21 – no matter what you do afterwards @gunnargrosch

Slide 26

Slide 26 text

An event is a signal that a system’s state has changed @gunnargrosch

Slide 27

Slide 27 text

COMMANDS VS EVENTS Command • Has an intent • Directed to a target • One-to-one CreateOrder ProcessOrder InvoiceOrder @gunnargrosch Event • Is a fact • For others to observe • One-to-many OrderCreated OrderProcessed OrderInvoiced

Slide 28

Slide 28 text

HOW IT USUALLY WORKS Storage Databases Analytics … @gunnargrosch Events Functions Event sources File stored Data changed Detection API call Business logic

Slide 29

Slide 29 text

BUILDING SERVICES @gunnargrosch UpdateOrder CreateOrder Database Order Service

Slide 30

Slide 30 text

ARCHITECTURE @gunnargrosch Delivery Service Order Service Client

Slide 31

Slide 31 text

ARCHITECTURE WITH FAN-OUT @gunnargrosch Delivery Service Order Service Client Billing Service Analytics Service

Slide 32

Slide 32 text

ARCHITECTURE WITH EVENT ROUTER @gunnargrosch Delivery Service Order Service Client Invoicing Service Analytics Service Event Router Asynchronous • Decouples downstream processes • Allows multiple subscribers with filters

Slide 33

Slide 33 text

ARCHITECTURE WITH EVENT ROUTER @gunnargrosch Delivery Service Order Service Client Invoicing Service Analytics Service Event Router Asynchronous • Decouples downstream processes • Allows multiple subscribers with filters

Slide 34

Slide 34 text

ARCHITECTURE WITH EVENT STORE @gunnargrosch Order Service Client Event Router Asynchronous • SNS to SQS is near guaranteed with 100 010 retries Functions Event Store Services Service

Slide 35

Slide 35 text

FINAL ARCHITECTURE @gunnargrosch Order Service Client SNS Asynchronous Functions SQS Services Service

Slide 36

Slide 36 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 37

Slide 37 text

”The most important announcement since the release of AWS Lambda in 2014” Paul Johnston @gunnargrosch

Slide 38

Slide 38 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 39

Slide 39 text

AMAZON EVENTBRIDGE • Fully managed, pay-as-you-go • Native integration with SaaS providers • Integrated with over 90 event sources and 15 targets • Send events from your own applications • Easily build event-driven application architectures • Now with CloudFormation support! @gunnargrosch

Slide 40

Slide 40 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 41

Slide 41 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 42

Slide 42 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 43

Slide 43 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 44

Slide 44 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 45

Slide 45 text

AMAZON EVENTBRIDGE @gunnargrosch

Slide 46

Slide 46 text

Amazon EventBridge SAMPLE EVENTBRIDGE SCHEDULER @gunnargrosch AWS Lambda

Slide 47

Slide 47 text

Amazon EventBridge Amazon Simple Storage Service SAMPLE S3 WITH EVENTBRIDGE @gunnargrosch AWS Lambda Client AWS Lambda Amazon Simple Queue Service

Slide 48

Slide 48 text

AWS Step Functions Amazon EventBridge SAMPLE SAAS WITH EVENTBRIDGE @gunnargrosch AWS Lambda SaaS Provider Amazon Simple Queue Service AWS Lambda Amazon DynamoDB

Slide 49

Slide 49 text

Amazon Aurora Serverless Amazon EventBridge SAMPLE CUSTOM EVENTBRIDGE EVENT @gunnargrosch AWS Lambda On-premise Monolith Amazon Simple Queue Service

Slide 50

Slide 50 text

Event-driven serverless applications with Amazon EventBridge @gunnargrosch

Slide 51

Slide 51 text

SERVERLESSDAYS STOCKHOLM – OCTOBER 24 • A developer-oriented conference about serverless technologies • Several talks with AWS in focus: • What can Clausewitz teach us about serverless? Richard Boyd, AWS • What to do with your data in a serverless world Angela Timofte, Trustpilot • How to build a full-stack serverless airline ticketing web app Heitor Lessa, AWS • CI/CD in the serverless era Efi Merdler-Kravitz, Lumigo • How Amazon EventBridge transforms serverless development James Beswick, AWS • Included in the ticket is a workshop of choice on October 25 • More info and tickets: https://stockholm.serverlessdays.io/ @gunnargrosch Promo code: AWS_UG_STHLM

Slide 52

Slide 52 text

52 CUSTOMERS @gunnargrosch

Slide 53

Slide 53 text

53 PARTNERS @gunnargrosch

Slide 54

Slide 54 text

54 Tynäsgatan 12 652 16 Karlstad +46 10 25 25 500 [email protected] www.opsio.se