This article contains content that is written like an advertisement. (October 2018) (Learn how and when to remove this template message)
|Initial release||November 2014|
AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. It was introduced in November 2014.
The purpose of Lambda, as compared to AWS EC2, is to simplify building smaller, on-demand applications that are responsive to events and new information. AWS targets starting a Lambda instance within milliseconds of an event. Node.js, Python, Java, Go, Ruby, and C# (through .NET Core) are all officially supported as of 2018[update]. In late 2018, custom runtime support was added to AWS Lambda, giving developers the ability to run a Lambda in the language of their choice.
AWS Lambda was designed for use cases such as image or object uploads to Amazon S3, updates to DynamoDB tables, responding to website clicks or reacting to sensor readings from an IoT connected device. AWS Lambda can also be used to automatically provision back-end services triggered by custom HTTP requests, and "spin down" such services when not in use, to save resources. These custom HTTP requests are configured in AWS API Gateway, which can also handle authentication and authorization in conjunction with AWS Cognito.
Unlike Amazon EC2, which is priced by the hour but metered by the second, AWS Lambda is metered in increments of 100 milliseconds. Usage amounts below a documented threshold fall within the AWS Lambda free tier - which does not expire 12 months after account signup, unlike the free tier for other AWS services.
In 2019, at AWS' annual cloud computing conference (AWS re:Invent), the AWS Lambda team announced "Provisioned Concurrency", a feature that "keeps functions initialized and hyper-ready to respond in double-digit milliseconds." The Lambda team described Provisioned Concurrency as "ideal for implementing interactive services, such as web and mobile backends, latency-sensitive microservices, or synchronous APIs."
Each AWS Lambda instance is a container created from Amazon Linux AMIs (a Linux distribution related to RHEL) with 128-3008 MB of RAM (in 64 MB increments), 512 MB of ephemeral storage (available in /tmp, the data lasts only for the duration of the instance, it gets discarded after all the tasks running in the instance complete) and a configurable execution time from 1 to 900 seconds. The instances are neither started nor controlled directly. Instead, a package containing the required tasks has to be created and uploaded (usually) to an S3 bucket and AWS is instructed (via Amazon Kinesis, DynamoDB or SQS) to run it when an event is triggered. Each such execution is run in a new environment so access to the execution context of previous and subsequent runs is not possible. This essentially makes the instances stateless, all the incoming and outgoing data needs to be stored by external means (usually via S3 or DynamoDB, inbound connections to the instances is disabled). The maximum compressed size of a Lambda package is 50 MB with the maximum uncompressed size being 250 MB.
- Event-driven architecture
- Serverless Framework
- Serverless computing
- Function as a service
- Lambda function, the concept of an anonymous computing function, not bound to an identity, which gives Amazon Lambda its name
- Oracle Cloud Platform
- Google Cloud Functions
- Azure Functions
- Handy, Alex (November 14, 2014). "Amazon introduces Lambda, Containers at AWS re:Invent". SD Times. Retrieved December 10, 2019.
- Munns, Chris (January 15, 2018). "Announcing Go Support for AWS Lambda". Amazon Web Services. Retrieved December 10, 2019.
- Munns, Chris (November 29, 2018). "Announcing Ruby Support for AWS Lambda". Amazon Web Services. Retrieved December 10, 2019.
- "AWS Lambda Now Supports Custom Runtimes and Enables Sharing Common Code Between Functions". Amazon Web Services. November 29, 2018. Retrieved December 10, 2019.
- Wagner, Tim (April 15, 2015). "Running Arbitrary Executables in AWS Lambda". AWS Compute Blog. Retrieved December 10, 2019.
- Bailly, Arnaud. "abailly/aws-lambda-haskell: Running Haskell code on AWS Lambda". GitHub. Retrieved December 10, 2019.
- "AWS Lambda Pricing". Amazon Web Services. Retrieved December 10, 2019.
- "New – Provisioned Concurrency for Lambda Functions". aws.amazon.com. Retrieved 2020-10-12.
- "New – Provisioned Concurrency for Lambda Functions". Amazon Web Services. 2019-12-03. Retrieved 2020-02-03.