In late 2014, AWS Lambda launched and has grown in widespread use since then. AWS lambda is a serverless computing technology which has been a game change for software development.
AWS Lambda is a service that makes it easy to build small scalable applications. Lambdas are small functions that are packaged up and sent to AWS. Using a framework like the serverless framework makes it fairly easy to work with and pretty efficient.
Lambda is event driven. It works by responding to events whether they be timed, API driven or responding to events within AWS. One of the most common examples of using lambda is to resize images that have been uploaded to an S3 bucket.
Lambda is stateless meaning that every time a function is triggered, it is a completely new environment.
There’s so many reasons to use AWS Lambda. It’s easy to get started with it, it’s massively flexible, it is very scalable and more.
Reason 1: Developers Can Focus on Providing Business Value
It’s really important to remember that technology simply provides a result for a company to achieve it’s goals, and objectives in an efficient manner.
By using functions as a service (FaaS), software developers are able to spend way more of their time on producing value for the business instead of dealing with infrastructure, plumbing and spending a lot of time doing configuration.
Lambda has a nearly perfect integration with a lot of other AWS services like API Gateway, and S3. It’s possible to implement production APIs with public urls in minutes instead of hours or days.
Reason 2: You Pay Only For What You Use
AWS only bills when the lambda is executing which is really advantageous for code that won’t execute much.
Billing is relatively complex at scale with lambda. Basically, the way it works is that you will be billed for the time it takes for the function to return or until it’s terminated.
AWS bills by the amount of memory that is provisioned and for the nearest 100ms of execution time. In theory, the more memory you provision the faster the lambda should execute.
For a lot of smaller companies or simple use cases it’s possible to pay absolutely nothing because of AWS’ really generous free tier.
Reason 3: There’s No Infrastructure to Maintain
There’s no need to have someone on or a whole department managing servers and other infrastructure.
Lambda runs code without having to provision or manage servers. There’s very little infrastructure that needs to be setup and maintenance is Amazon Web Services’ problem.
The lambda service performs all of the operational administrative parts of the job without having to involve technology personnel. Things like provisioning capacity, applying security patches and monitoring health are all done by AWS.
Thankfully cloud computing started reducing a lot of that before lambda though!
Reason 4: High Scalability Without Over Provisioning
Lambda can scale up to a really large number of parallel executions without a developer or technology member having to do anything.
A well designed lambda function should be able to execute hundreds of times a second with very minimal impact to other parts of the service. If you need to control how often it can execute, there’s a really simple setting in the AWS Console called “Number of concurrent requests” that can be adjusted.
If a particular function isn’t being called much or at all, then AWS can automatically rightscale it to the desired amount without anybody needing to do anything.
Reason 5: Small Functions Make Testing Easier
Due to the limitations of lambda such as memory only being available for 128MB – 3GB and only having 512MB of hard drive space, it’s really important that each function be really small and really efficient.
As a result, most functions can only do one thing and must respond really fast which makes manual and automated testing so much easier.
Pairing lambda with the serverless framework and continuous deployment and continuous integration makes it an incredible experience for developers and companies.