Setting up and running a backend or server can be a very resource intensive part of the development process for many companies/products. Amazon AWS Lambda is a serverless computing service that gives companies the computing power they would usually get from a server, but for much less time and money. This lets developers focus on writing great code and building great products. This short piece will give an introduction on AWS Lambda.
AWS Lambda is considered to be both serverless and event driven. An event driven platform is one that traditionally depends on input from the user to determine which process will be executed next. The input might be a mouse click, a key press, or any other sensor input. The program contains a primary loop that ‘listens’ for any event that might take place and a separate function that calls another executable code when triggered.
Lambda is priced in 100 millisecond increments. This can decrease costs if only a short amount of computing time is needed (vs. paying for a server by the hour). While the EC2 service targets large scale operations, AWS Lambda serves applications that are usually smaller and more dynamic.
Lambda can also be run alongside other Amazon S3 services. It can be programmed to respond to whenever there is a change in the data contained in an S3 Bucket. A container would be launched when the Lambda function is launched. The container is active for sometime even after the code is executed as it waits for more code.
Websites that rely on tasks like image uploading or simple data analytics can make use of Lambda to handle simple discrete processes. Paired with Amazon Gateway API, Lambda can also be used to host backend logic for websites over HTTPS.
Traditionally, developers would setup servers and processes to have computing power (to be to execute different tasks). With AWS Lambda, they can focus on their product and buy spot computing power from Lambda only when they need it.