Spotlight
AWS Lambda Functions: Return Response and Continue Executing
A how-to guide using the Node.js Lambda runtime.
Thu, 04 Aug 2016
When you hear “Serverless” I know what you’re thinking… oh boy, another buzzword! I get it. And it’s a pretty confusing one, on two levels:
So what’s different? Well actually, once you get past the buzzword, quite a lot. There’s a fundamental idea here that is actually a pretty big deal in our opinion.
Services and Functions are the Platform Abstraction and the Unit of Deployment
In the typical Platform as a Service, a monolithic app is the platform abstraction and unit of deployment. This has a lot of downsides. As a result, fully managed platforms in general have retained a niche role in the IT landscape. The change in abstraction level to services/functions removes most of these downsides:
Traditional PaaS | Serverless |
---|---|
Highly curated | Minimal curation: Functions run in a Linux container. A few languages are natively supported and you can bring-your-own-binary to support any language. |
Single monolithic app can be a challenge to scale | Inherent decoupling with functions and services, which can run independently and scale almost infinitely |
Fairly large black box underneath the hood limits customizability | By hooking up individual functions and services, the system is highly customizable for very complex architectures or a variety of enterprise / security requirements |
Even better, Serverless architectures retain all of the traditional benefits of platform abstractions, and a few more:
OK, enough discussion of abstractions. What does Serverless really mean at a more concrete level?
At the heart of Serverless is a function-as-a-service cloud offering.
AWS invented this category in the Fall of 2014 with Lambda. Azure, Google Compute, IBM Bluemix, and others have quickly followed with competitors, but Lambda was the first mover and is by far the most mature and most widely used.
The fundamental idea here is that you upload your code and it runs when requested as an isolated container, with as much concurrency as you need. You don’t need to worry about container orchestration, OS configs, or the underlying servers… just upload your code and run your function.
Critically, though, a Serverless architecture relies on more than just a cloud function. In AWS, a typical Serverless architecture consists of the following AWS services:
In upcoming posts, we’ll dive deeper into Serverless architectures and give you a better idea of how you can architect your next solution with Serverless.
A how-to guide using the Node.js Lambda runtime.