Slide 1

Slide 1 text

with @DavidWells Microservices Building

Slide 2

Slide 2 text

I'm @DavidWells Software Developer @

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

AWS Lambda

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

How did we get here 1. Build and maintain your own machines 2. Buy space in someone else's server farm 3. Run virtual machines in the cloud 4. Run containers in the cloud 5. Serverless Compute

Slide 7

Slide 7 text

Serverless?

Slide 8

Slide 8 text

WTF!!!!! Serverless?

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Serverless Auto-scaling focus on your core application logic not infrastructure Event Driven Architectures Never pay for idle Code runs as stateless functions Leverage third party services

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

after free tier $0.20 per 1 million requests ($0.0000002 per request) First 1 million requests (400,000 GB-seconds) free per month

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

• Nordstrom • Coca-Cola • Autodesk • Angie’s List • Vevo • Booz Allen Hamilton • NY Life Insurance • Australian Government • LendingTree • Amazon • Vice • Accenture • And more Enterprise Users Serverless State of the union re:Invent 2016 youtube.com/watch?v=AcGv3qUrRC4

Slide 18

Slide 18 text

Finra Serverless State of the union re:Invent 2016 youtube.com/watch?v=AcGv3qUrRC4

Slide 19

Slide 19 text

serverless.com/blog/dept-of-defense-doc-bot US Department of Defense

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

You can manually do this in UI...

Slide 22

Slide 22 text

Your code + + = infinitely scalable, pay-per-execution microservices Framework (CLI)

Slide 23

Slide 23 text

Project Structure code: handler.js config: serverless.yml Framework

Slide 24

Slide 24 text

serverless.yml config file

Slide 25

Slide 25 text

Where to run serverless.yml config file When to run What to run

Slide 26

Slide 26 text

Where to run What to run When to run serverless.yml config file

Slide 27

Slide 27 text

named export saveUser function is referenced in serverless.yml handler.js file

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Your code runs in response to events - a POST request is sent to /createUser - a new item is added to the database - a scheduled cron triggers - a new image is added to an s3 bucket - an infrastructure event matching a rule is found - a SAAS webhook is fired - a link in an email is clicked - ... etc

Slide 31

Slide 31 text

use cases

Slide 32

Slide 32 text

• DevOps/Infrastructure Automation • Auditing resources for security • Bots (Chat/Voice) • Alexa skills • IoT events • Infrastructure events • S3 - new files, updated files etc • DynamoDB - new items in DB • ... • Web + Mobile backend APIs • Form processing • Image processing • Web scraping / testing • Running binaries • Serving HTML / dynamic binaries • Webhook listeners • Cron jobs github.com/serverless/examples Use Cases

Slide 33

Slide 33 text

• Amazon API Gateway • Amazon S3 • Amazon DynamoDB • Amazon Kinesis Streams • Amazon Simple Notification Service • Amazon Simple Email Service • Amazon Cognito bit.ly/infra-events • AWS CloudFormation • Amazon CloudWatch Logs • Amazon CloudWatch Events • AWS CodeCommit • Scheduled Events • AWS Config • Amazon Echo • Amazon Lex Infrastructure Events

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

EVERYTHING*

Slide 36

Slide 36 text

Patterns

Slide 37

Slide 37 text

Serverless Backend API

Slide 38

Slide 38 text

UI REST Backend API serverless.com/framework/status

Slide 39

Slide 39 text

REST Backend API (expanded)

Slide 40

Slide 40 text

microapps.com/blog/serverless-framework REST Backend API (production)

Slide 41

Slide 41 text

GraphQL Backend API

Slide 42

Slide 42 text

Serverless Fan Out

Slide 43

Slide 43 text

Fan out pattern

Slide 44

Slide 44 text

Effortlessly Scaling Data Science with PyWren by Eric Jonas bit.ly/2skOZj9

Slide 45

Slide 45 text

bit.ly/2reLdD5 AWS Lambda Invasion in Big Data

Slide 46

Slide 46 text

Event driven serverless architectures

Slide 47

Slide 47 text

github.com/Nordstrom/hello-retail

Slide 48

Slide 48 text

Highly recommend watching bit.ly/hello-retail-video

Slide 49

Slide 49 text

Highly recommend watching bit.ly/hello-retail-video

Slide 50

Slide 50 text

bit.ly/i-heart-logs Real world example unified log Event "Job Page Viewed"

Slide 51

Slide 51 text

bit.ly/sls-design-patterns See more serverless design patterns

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

Challenges

Slide 54

Slide 54 text

Service Discovery

Slide 55

Slide 55 text

Secret Management

Slide 56

Slide 56 text

Logging

Slide 57

Slide 57 text

Deployments

Slide 58

Slide 58 text

Tracing

Slide 59

Slide 59 text

Cold starts

Slide 60

Slide 60 text

github.com/serverless/examples

Slide 61

Slide 61 text

Finding More Use Cases and Examples

Slide 62

Slide 62 text


 Thanks for listening! Questions? Tweet @DavidWells