Jump to content

AWS Lambda

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Squam Lizard (talk | contribs) at 12:02, 9 October 2022 (Changing short description from "Event-driven, serverless computing platform provided by Amazon" to "Serverless computing platform"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

AWS Lambda
Developer(s)Amazon.com
Initial releaseNovember 13, 2014; 10 years ago (2014-11-13)
Operating systemCross-platform
Available inEnglish
Websiteaws.amazon.com/lambda Edit this on Wikidata

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 on November 13, 2014.[1]

Node.js, Python, Java, Go,[2] Ruby,[3] and C# (through .NET) are all officially supported as of 2018. In late 2018, custom runtime support[4] was added to AWS Lambda.

AWS Lambda supports running native Linux executables via calling out from a supported runtime such as Node.js.[5] For example, Haskell code can be run on Lambda.[6]

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 by rounding up to the nearest millisecond with no minimum execution time.

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."[7] The Lambda team described Provisioned Concurrency as "ideal for implementing interactive services, such as web and mobile backends, latency-sensitive microservices, or synchronous APIs."[8]

Specification

Each AWS Lambda instance is a container created from Amazon Linux AMIs (a Linux distribution related to RHEL) with 128–10240 MB of RAM (in 1 MB increments),[9] 512 MB to 10 GB of ephemeral storage in /tmp folder,[10] and a configurable execution time from 1 to 900 seconds. Ephemeral storage remains locally available only for the duration of the instance and is discarded after all tasks running on the instance complete.

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 are disabled). The maximum compressed size of a Lambda package is 50 MB with the maximum uncompressed size being 250 MB.

Since December 2020 Lambda supports Docker containers through ECR up to 10 GB in size.[11]

See also

References

  1. ^ Barr, Jeff (November 13, 2014). "AWS Lambda – Run Code in the Cloud". AWS News Blog. Retrieved August 29, 2022.
  2. ^ Munns, Chris (January 15, 2018). "Announcing Go Support for AWS Lambda". Amazon Web Services. Retrieved December 10, 2019.
  3. ^ Munns, Chris (November 29, 2018). "Announcing Ruby Support for AWS Lambda". Amazon Web Services. Retrieved December 10, 2019.
  4. ^ "AWS Lambda Now Supports Custom Runtimes and Enables Sharing Common Code Between Functions". Amazon Web Services. November 29, 2018. Retrieved December 10, 2019.
  5. ^ Wagner, Tim (April 15, 2015). "Running Arbitrary Executables in AWS Lambda". AWS Compute Blog. Retrieved December 10, 2019.
  6. ^ Bailly, Arnaud. "abailly/aws-lambda-haskell: Running Haskell code on AWS Lambda". GitHub. Retrieved December 10, 2019.
  7. ^ "New – Provisioned Concurrency for Lambda Functions". aws.amazon.com. 3 December 2019. Retrieved 2020-10-12.
  8. ^ "New – Provisioned Concurrency for Lambda Functions". Amazon Web Services. 2019-12-03. Retrieved 2020-02-03.
  9. ^ "AWS Lambda now supports up to 10 GB of memory and 6 vCPU cores for Lambda Functions". About AWS. December 1, 2021. Retrieved January 29, 2021.
  10. ^ Yun, Channy. "AWS Lambda Now Supports Up to 10 GB Ephemeral Storage". AWS News Blog. Retrieved 1 April 2022.
  11. ^ "New for AWS Lambda – Container Image Support". Amazon Web Services. 2020-12-01. Retrieved 2021-06-03.