Skip to content

Instantly share code, notes, and snippets.

@yesokay
Last active January 31, 2018 18:34
Show Gist options
  • Save yesokay/d4de5f6bc683823f3887fcf6dcd7220e to your computer and use it in GitHub Desktop.
Save yesokay/d4de5f6bc683823f3887fcf6dcd7220e to your computer and use it in GitHub Desktop.
Presentation notes: Going serverless with AWS Lambda (September 15, 2016)

Going serverless with AWS Lambda

We used to have some specific problems…

  • "We’re expecting requests per second to fluctuate between 2 and 30,000."
  • Oops, we put the wrong instance in the load balancer.
  • Oops, beanstalk crapped its pants.

But in 2015, we discovered AWS Lambda and it changed the frame of reference for a lot of problems.

We went from bare metal, to VPS setups, to Platform as a Service (Heroku), to containers (Docker), to FaaS – Function as a Service, currently best represented by AWS Lambda.

What is it then?

AWS Lambda lets you run Python (or Node.js or Java) code in a transient environment that has a minimum lifetime of a split second.

An instance of your code (function) spins up as a response to an event:

  • HTTP request (via AWS API Gateway)
  • S3 bucket change
  • Database change (limited to AWS databases)
  • Time schedule

and in turn performs an action that can also manipulate these sources.

The AWS Lambda page has a few good examples to explain this.

Pros

  • No need to manage system resources
  • Infinitely scalable, highly available
  • Pay only for execution time in 0.1 second increments
  • Less devops work
  • Full integration with AWS ecosystem

Cons

  • No way to manage system resources (apart from memory size, I guess)
  • Cannot serve files or data internally
  • Stateless and untraceable after it runs
  • Lock-in to AWS ecosystem

Example use cases

Limitations

  • 50 MB max. deployment package (zipped)
  • 512 MB max. disk space use per function (unzipped)
  • 1024 processes / threads per runtime
  • 5 minute maximum execution time
  • 6 MB max. invocation / response payload The official suggestion is, if you exceed these limits, it can probably be split into multiple microservices.

About me


Parkour turns your car into a giant credit card via its visual identity. Never get out of your car to pay for parking, gas, or your McDrive meal again!


Join us: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment