Slide 1

Slide 1 text

Serverless Anti-Patterns @IamStan

Slide 2

Slide 2 text

@IamStan “Best Practice”

Slide 3

Slide 3 text

https://medium.com/byteagenten/serverless-architecture-with-aws-adcaa3415acd @IamStan

Slide 4

Slide 4 text

https://aws.amazon.com/blogs/aws/category/amazon-elasticsearch-service/ @IamStan

Slide 5

Slide 5 text

https://www.oreilly.com/ideas/using-serverless-architectures-to-build-applications-with-aws-and-java @IamStan

Slide 6

Slide 6 text

http://theburningmonk.com/2016/12/yubls-road-to-serverless-architecture-part-1/ @IamStan

Slide 7

Slide 7 text

@IamStan

Slide 8

Slide 8 text

@IamStan Serverless Design Patterns.. The Book!

Slide 9

Slide 9 text

@IamStan Primitive Pattern: Periodical (Cron Job) Primitive Pattern: Messaging API Pattern: Wrapper/Proxy API Pattern: Facade API Pattern: Async Orchestration: One way chain Orchestration: Two way chain Orchestration: Fan out Orchestration: Fan in Pipes & Filters: Workflow and Long Running Pipes & Filters: Streams Traditional: Command Traditional: Singleton Serverless Design Patterns.. The Book!

Slide 10

Slide 10 text

@IamStan Learning to Code Journey http://www.vikingcodeschool.com/posts/why-learning-to-code-is-so-damn-hard

Slide 11

Slide 11 text

@IamStan Learning to Serverless Journey Deployed something into production Oh sh*t I need to maintain this thing Now I’m deploying servers to manage my serverless application I can never imagine doing it any other way Serverless is Lyf

Slide 12

Slide 12 text

@IamStan How not to serverless!

Slide 13

Slide 13 text

@IamStan The FaaSaaS Pattern (Function as a Service as a Server)

Slide 14

Slide 14 text

@IamStan

Slide 15

Slide 15 text

@IamStan FaaSaaS - GraphQL Edition https://serverless.zone/graphql-with-the-serverless-framework-79924829a8ca

Slide 16

Slide 16 text

@IamStan FaaSaaS - GraphQL Edition https://github.com/serverless/serverless-graphql-apollo

Slide 17

Slide 17 text

@IamStan FaaSaaS - GraphQL Edition > 40,000,000 visits per month ~ 5,000,000 visits per month

Slide 18

Slide 18 text

@IamStan

Slide 19

Slide 19 text

@IamStan FaaSaaS - Apex Up https://github.com/apex/up TJ Holowaychuk Apex Framework Express Mocha Koa 545 packages on NPM

Slide 20

Slide 20 text

@IamStan FaaSaaS - Apex Up Makes your function act like a VPS Up CLI for easy deployment Up Golang Proxy inside function JSON -> HTML

Slide 21

Slide 21 text

@IamStan FaaSaaS - Apex Up Runtimes: - Python - Golang - Node.js - Crystal - Static sites

Slide 22

Slide 22 text

@IamStan FaaSaaS - Apex Up Up CLI abstracts away - Lambda - API Gateway - Route 53 - CloudTrail - CloudFront - ACM

Slide 23

Slide 23 text

@IamStan FaaSaaS - Apex Up

Slide 24

Slide 24 text

@IamStan

Slide 25

Slide 25 text

@IamStan FaaSaaS - Zappa https://github.com/Miserlou/Zappa Rich Jones Founder gun.io NoDB S3SQLite Gone in 60 Seconds (Intrusion and Exfiltration in Serverless Architectures)

Slide 26

Slide 26 text

@IamStan FaaSaaS - Zappa Python framework (supports 2.7 & 3.6) Works with any works with any WSGI*- compatible framework Includes Django, Flask, Pyramid, Bottle *WSGI = Web Server Gateway Interface

Slide 27

Slide 27 text

@IamStan FaaSaaS - Zappa -VTL to map body, headers, method, params and query strings into JSON, and then turning that into valid WSGI -Attaching response codes to response bodies, Base64 encoding, using that as a regex to route the response code, decoding in VTL, then mapping the response body -Packing and Base58 encoding multiple cookies into a single cookie -Turning cookie-setting 301/302 responses into 200 responses with HTML redirects

Slide 28

Slide 28 text

@IamStan FaaSaaS - Zappa Allows you to run your Python app in Lambda without any changes Allows you to run deploy decoupled Serverless Apps Broad support for AWS services (x-Ray, Cognito, SNS, etc) Up to date with AWS feature set (ie Dead Letter Queues)

Slide 29

Slide 29 text

@IamStan The wrens are mostly small, brownish passerine birds in the mainly New World family Troglodytidae. ... Most wrens are small and rather inconspicuous, except for their loud and often complex songs. - Wikipedia

Slide 30

Slide 30 text

I’m not too sure what to call it - PyWren @IamStan https://github.com/pywren/pywren RISE Lab Real-time Intelligent Secure Execution

Slide 31

Slide 31 text

@IamStan I’m not too sure what to call it - PyWren

Slide 32

Slide 32 text

I’m not too sure what to call it - PyWren @IamStan Streams your user code from S3 and hot loads it into Lambda Uses the Anaconda Python Runtime Can scale to your Lambda account concurrency limit Alternatively can use a single EC2 server

Slide 33

Slide 33 text

@IamStan Thank you!

Slide 34

Slide 34 text

@IamStan There is more than one way to Serverless!!