Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless Anti-Patterns

Ant Stanley
November 15, 2017

Serverless Anti-Patterns

Talk given at the Serverless London User Group on 15 November 2017. Focus on some serverless patterns that aren't event driven, decoupled microservices, but are very effective.

Ant Stanley

November 15, 2017
Tweet

More Decks by Ant Stanley

Other Decks in Programming

Transcript

  1. @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!
  2. @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
  3. @IamStan FaaSaaS - Apex Up Makes your function act like

    a VPS Up CLI for easy deployment Up Golang Proxy inside function JSON -> HTML
  4. @IamStan FaaSaaS - Apex Up Runtimes: - Python - Golang

    - Node.js - Crystal - Static sites
  5. @IamStan FaaSaaS - Apex Up Up CLI abstracts away -

    Lambda - API Gateway - Route 53 - CloudTrail - CloudFront - ACM
  6. @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)
  7. @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
  8. @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
  9. @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)
  10. @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
  11. I’m not too sure what to call it - PyWren

    @IamStan https://github.com/pywren/pywren RISE Lab Real-time Intelligent Secure Execution
  12. 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