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

Taking Python Serverless: Using Zappa to Deploy...

maltzj
November 12, 2019

Taking Python Serverless: Using Zappa to Deploy Webapps Without Infrastructure

So you've built your Python application and want to deploy it to your users. How do you go about that? One increasingly common answer to that question is ""deploy it as a serverless application"". What does it mean to deploy a serverless app, and how can you try out serverless in a low-risk way?

This talk will answer both of those questions. First, it will give an overview of serverless applications and the advantages they provide over other deployment modes. Next it will dig into Zappa, a library for deploying serverless python apps, and show how Zappa allows you to deploy your webapp as a serverless application in seconds. This ease also comes with trade-offs, so the talk will close by discussing what you lose with Zappa and how we've worked around those limits at Nuna. By the end of this talk, you'll have a better understanding of serverless applications and you'll be able to evaluate if Zappa is the right fit for your needs.

Talk Resources:

Zappa: https://github.com/Miserlou/Zappa
Serverless: https://serverless.com/
AWS SAM: https://aws.amazon.com/serverless/sam/
Chalice - https://github.com/aws/chalice
PEP 333 - https://www.python.org/dev/peps/pep-0333/
AWS Lambda Limitations - https://docs.aws.amazon.com/lambda/latest/dg/limits.html
Serverless Conf NYC: https://acloud.guru/series/serverlessconf-nyc-2019
Google Cloud Run: https://cloud.google.com/run/
AWS Fargate: https://aws.amazon.com/fargate/

maltzj

November 12, 2019
Tweet

More Decks by maltzj

Other Decks in Programming

Transcript

  1. @maltzj Taking Python Serverless: Using Zappa to Deploy Webapps Without

    Infrastructure Jonathan Maltz @maltzj 11-13-19 AUTHOR DATE
  2. @maltzj @maltzj Lambda's Promise: Give me a zip file within

    some constraints, and I'll just run that code for you
  3. @maltzj @maltzj Serverless Frameworks: Tools that let you stitch together

    your serverless code and provision the necessary cloud resources.
  4. @maltzj @maltzj Application (Frameworks that use parsed HTTP) Server (Things

    that deal with raw HTTP) callable(environ, start_response)
  5. @maltzj @maltzj Application (Frameworks that use parsed HTTP) Server (Things

    that deal with raw HTTP) callable(environ, start_response)
  6. @maltzj @maltzj Application (Frameworks that use parsed HTTP) Server (Things

    that deal with raw HTTP) callable(environ, start_response)
  7. @maltzj @maltzj Zappa Handler (Speaks WSGI) Your WSGI App Zappa

    CLI Lambda-ready Zip AWS Opinionated cloud provisioning (via Boto)
  8. @maltzj • No servers == rethinking lots of assumptions ◦

    How do I get to my DB? ◦ Where are my logs? ◦ Lean on cloud services to mitigate • Some constraint on what you can build ◦ Lambda size limits, application response sizes ◦ Many can be worked around Some things to be aware of
  9. @maltzj How's Zappa Overall? • Very quick if you will

    play within its box ◦ WSGI webapps, only python • Maintenance story is not great • Would suggest evaluating alongside serverless + plugins
  10. @maltzj • Zappa: https://github.com/Miserlou/Zappa • Serverless: https://serverless.com/ • AWS SAM:

    https://aws.amazon.com/serverless/sam/ • Chalice - https://github.com/aws/chalice • PEP 333 - https://www.python.org/dev/peps/pep-0333/ • AWS Lambda Limitations - https://docs.aws.amazon.com/lambda/latest/dg/limits.html • Serverless Conf NYC: https://acloud.guru/series/serverlessconf-nyc-2019 • Google Cloud Run: https://cloud.google.com/run/ • AWS Fargate: https://aws.amazon.com/fargate/ Resources