AWS Lambda

Last updated
AWS Lambda
Developer(s) Amazon.com
Initial releaseNovember 13, 2014;10 years ago (2014-11-13)
Operating system Cross-platform
Available inEnglish
Website aws.amazon.com/lambda   OOjs UI icon edit-ltr-progressive.svg

AWS Lambda is an event-driven, serverless Function as a Service (FaaS) provided by Amazon as a part of Amazon Web Services. It is designed to enable developers to run code without provisioning or managing servers. It executes code in response to events and automatically manages the computing resources required by that code. It was introduced on November 13, 2014. [1]

Contents

Specification

Each AWS Lambda instance is a container created from Amazon Linux AMIs (a Linux distribution related to RHEL) and a configurable execution time. 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.

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

The Lambda Function URL gives Lambda a unique and permanent URL which can be accessed by authenticated and non-authenticated users alike. [7]

Lambda layer

AWS Lambda layer is a ZIP archive containing libraries, frameworks or custom code that can be added to AWS Lambda functions. [8] As of December 2024, AWS Lambda layers have significant limitations: [9] [10]

AWS Serverless Hero Yan Cui recommends alternative code-sharing strategies using package managers (e.g., NPM) due to these constraints. [11]

Best practices

Following DevSecOps practices can help end-users to use and secure Lambda-based applications more effectively. [12] In Lambda-based applications, the line between the infrastructure and business logic is blurred and the apps are usually spread across various services. According to Yan Cui, to get the most value from testing efforts, Lambda-based applications should be tested mainly for their integrations, and unit tests should be used only if there is a complex business logic. Also, to make debugging and implementation of Lambda-based easier, developers should use orchestration within the bounded context of a microservice, and should use choreography between the bounded-contexts. [11]

Portability

Migration from AWS Lambda to other AWS compute services (e.g., Amazon ECS) can be challenging due to tight integrations with the service provider, a phenomenon known as service lock-in. Tools like AWS Lambda Web Adapter can facilitate portability by enabling developers to build web applications using familiar frameworks, employing the Lambdalith or Lambda monolith pattern. [13] [14] However, this approach has some limitations:

Hexagonal architecture can facilitate workload portability. It can help with both HTTP and non-HTTP APIs. [11]

Testing

Testing integrations between services is crucial, particularly for serverless applications like AWS Lambda, due to their distributed and fragmented architecture. Simulator tools like LocalStack can facilitate testing but may yield false positives because they may diverge from actual AWS services. [15]

To address this limitation, Yan Cui introduced "remocal testing," enabling local execution of application code while interacting with genuine AWS services. This approach allows real-time debugging and rapid code modifications without deployment. However, it necessitates provisioning and subsequent decommissioning of AWS resources, requiring meticulous planning. [11]

Helper Tools

Lambda Live Debugger is an open-source tools that helps you debug your AWS Lambda functions from your computer, while they are deployed in the cloud. It supports AWS CDK v2, Serverless Framework v3, AWS Serverless Application Model (SAM) and Terraform. [16]

Security

In April 2022, researchers found cryptomining malware targeting AWS Lambda named "Denonia". [17] [18] [19]

See also

Related Research Articles

<span class="mw-page-title-main">Amazon Web Services</span> On-demand cloud computing company

Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon that provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered, pay-as-you-go basis. Clients will often use this in combination with autoscaling. These cloud computing web services provide various services related to networking, compute, storage, middleware, IoT and other processing capacity, as well as software tools via AWS server farms. This frees clients from managing, scaling, and patching hardware and operating systems. One of the foundational services is Amazon Elastic Compute Cloud (EC2), which allows users to have at their disposal a virtual cluster of computers, with extremely high availability, which can be interacted with over the internet via REST APIs, a CLI or the AWS console. AWS's virtual computers emulate most of the attributes of a real computer, including hardware central processing units (CPUs) and graphics processing units (GPUs) for processing; local/RAM memory; hard-disk (HDD)/SSD storage; a choice of operating systems; networking; and pre-loaded application software such as web servers, databases, and customer relationship management (CRM).

<span class="mw-page-title-main">Amazon Elastic Compute Cloud</span> Cloud computing platform

Amazon Elastic Compute Cloud (EC2) is a part of Amazon's cloud-computing platform, Amazon Web Services (AWS), that allows users to rent virtual computers on which to run their own computer applications. EC2 encourages scalable deployment of applications by providing a web service through which a user can boot an Amazon Machine Image (AMI) to configure a virtual machine, which Amazon calls an "instance", containing any software desired. A user can create, launch, and terminate server-instances as needed, paying by the second for active servers – hence the term "elastic". EC2 provides users with control over the geographical location of instances that allows for latency optimization and high levels of redundancy. In November 2010, Amazon switched its own retail website platform to EC2 and AWS.

<span class="mw-page-title-main">Cloud computing</span> Form of shared internet-based computing

"Cloud computing is a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO.

Eucalyptus is a paid and open-source computer software for building Amazon Web Services (AWS)-compatible private and hybrid cloud computing environments, originally developed by the company Eucalyptus Systems. Eucalyptus is an acronym for Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems. Eucalyptus enables pooling compute, storage, and network resources that can be dynamically scaled up or down as application workloads change. Mårten Mickos was the CEO of Eucalyptus. In September 2014, Eucalyptus was acquired by Hewlett-Packard and then maintained by DXC Technology. After DXC stopped developing the product in late 2017, AppScale Systems forked the code and started supporting Eucalyptus customers.

<span class="mw-page-title-main">AppScale</span> American cloud infrastructure software company

AppScale is a software company that offers cloud infrastructure software and services to enterprises, government agencies, contractors, and third-party service providers. The company commercially supports one software product, AppScale ATS, a managed hybrid cloud infrastructure software platform that emulates the core AWS APIs. In 2019, the company ended commercial support for its open-source serverless computing platform AppScale GTS, but AppScale GTS source code remains freely available to the open-source community.

Amazon Relational Database Service is a distributed relational database service by Amazon Web Services (AWS). It is a web service running "in the cloud" designed to simplify the setup, operation, and scaling of a relational database for use in applications. Administration processes like patching the database software, backing up databases and enabling point-in-time recovery are managed automatically. Scaling storage and compute resources can be performed by a single API call to the AWS control plane on-demand. AWS does not offer an SSH connection to the underlying virtual machine as part of the managed service.

A cloud database is a database that typically runs on a cloud computing platform and access to the database is provided as-a-service. There are two common deployment models: users can run databases on the cloud independently, using a virtual machine image, or they can purchase access to a database service, maintained by a cloud database provider. Of the databases available on the cloud, some are SQL-based and some use a NoSQL data model.

Backend as a service (BaaS), sometimes also referred to as mobile backend as a service (MBaaS), is a service for providing web app and mobile app developers with a way to easily build a backend to their frontend applications. Features available include user management, push notifications, and integration with social networking services. These services are provided via the use of custom software development kits (SDKs) and application programming interfaces (APIs). BaaS is a relatively recent development in cloud computing, with most BaaS startups dating from 2011 or later. Some of the most popular service providers are AWS Amplify and Firebase.

Cloud analytics is a marketing term for businesses to carry out analysis using cloud computing. It uses a range of analytical tools and techniques to help companies extract information from massive data and present it in a way that is easily categorised and readily available via a web browser.

Amazon Aurora is a proprietary relational database offered as a service by Amazon Web Services (AWS) since October 2014. Aurora is available as part of the Amazon Relational Database Service (RDS).

The Serverless Framework is a web framework written using Node.js. Serverless is the first framework developed for building applications on AWS Lambda, a serverless computing platform provided by Amazon as a part of Amazon Web Services. Currently, applications developed with Serverless can be deployed to other function as a service providers, including Microsoft Azure with Azure Functions, IBM Bluemix with IBM Cloud Functions based on Apache OpenWhisk, Google Cloud using Google Cloud Functions, Oracle Cloud using Oracle Fn, Kubeless based on Kubernetes, Spotinst and Webtask by Auth0.

This is a timeline of Amazon Web Services, which offers a suite of cloud computing services that make up an on-demand computing platform.

Serverless computing is a cloud computing execution model in which the cloud provider allocates resources on demand, taking care of the servers on behalf of their customers. According to ISO/IEC 22123-2: "Serverless computing is a cloud service category in which the customer can use different cloud capabilities types without the customer having to provision, deploy and manage either hardware or software resources, other than providing customer application code or providing customer data. Serverless computing represents a form of virtualized computing." Function as a service and serverless database are two forms of serverless computing.

Function as a service (FaaS) is a category of cloud computing services that provides a platform allowing customers to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app. Building an application following this model is one way of achieving a "serverless" architecture, and is typically used when building microservices applications.

Apache MXNet is an open-source deep learning software framework that trains and deploys deep neural networks. It aims to be scalable, allows fast model training, and supports a flexible programming model and multiple programming languages. The MXNet library is portable and can scale to multiple GPUs and machines. It was co-developed by Carlos Guestrin at the University of Washington, along with GraphLab.

<span class="mw-page-title-main">Netlify</span> American cloud computing company

Netlify is a remote-first cloud computing company that offers a development platform that includes build, deploy, and serverless backend services for web applications and dynamic websites.

AWS Glue is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It was introduced in August 2017.

AWS Graviton is a family of 64-bit ARM-based CPUs designed by the Amazon Web Services (AWS) subsidiary Annapurna Labs. The processor family is distinguished by its lower energy use relative to x86-64, static clock rates, and omission of simultaneous multithreading. It was designed to be tightly integrated with AWS servers and datacenters, and is not sold outside Amazon.

The AWS Cloud Development Kit is an open-source software development framework developed by Amazon Web Services (AWS) for defining and provisioning cloud infrastructure resources using familiar programming languages. The AWS CDK aims to improve the experience of working with Infrastructure as Code by providing higher-level, reusable constructs that enable developers to create and manage AWS resources more efficiently and with less boilerplate code compared to traditional configuration files like AWS CloudFormation templates.

DBOS is a Database-Oriented Operating System designed to simplify and improve the scalability, security and resilience of large-scale distributed applications. It started in 2020 as a joint open source project with MIT, Stanford and Carnegie Mellon University, after a brainstorm between Michael Stonebraker and Matei Zaharia on how to scale and improve scheduling and performance of millions of Apache Spark tasks.

References

  1. Serverless Development on AWS Building Enterprise-Scale Serverless Solutions. O'Reilly Media. ISBN   9781098141899.
  2. Munns, Chris (January 15, 2018). "Announcing Go Support for AWS Lambda". Amazon Web Services. Archived from the original on October 15, 2019. Retrieved December 10, 2019.
  3. Munns, Chris (November 29, 2018). "Announcing Ruby Support for AWS Lambda". Amazon Web Services. Archived from the original on October 15, 2019. Retrieved December 10, 2019.
  4. "AWS Lambda Now Supports Custom Runtimes and Enables Sharing Common Code Between Functions". Amazon Web Services. November 29, 2018. Archived from the original on October 17, 2019. Retrieved December 10, 2019.
  5. "New – Provisioned Concurrency for Lambda Functions". aws.amazon.com. 3 December 2019. Archived from the original on 2020-10-18. Retrieved 2020-10-12.
  6. "New – Provisioned Concurrency for Lambda Functions". Amazon Web Services. 2019-12-03. Archived from the original on 2020-02-03. Retrieved 2020-02-03.
  7. "Lambda function URLs - AWS Lambda". docs.aws.amazon.com. Archived from the original on 2024-03-01. Retrieved 2024-03-01.
  8. "Managing Lambda dependencies with layers". Archived from the original on 2024-02-04. Retrieved 2024-02-02.
  9. Sbarski, Peter. Serverless Architectures on AWS: With examples using AWS Lambda. ISBN   9781638351146.
  10. Data Engineering with AWS: Learn how to design and build cloud-based data transformation pipelines using AWS. ISBN   9781800569041.
  11. 1 2 3 4 Cui, Yan (2020). Serverless Architectures on AWS (2nd ed.). Manning. ISBN   978-1617295423.
  12. Katzer, Jason (2020). Learning Serverless: Design, Develop, and Deploy with Confidence. O'Reilly Media. ISBN   978-1492057017.
  13. "AWS Lambda Web Adapter". Archived from the original on 2024-11-28. Retrieved 2024-11-29.
  14. "The Lambda monolith". Archived from the original on 2024-11-26. Retrieved 2024-11-29.
  15. Stojanovic, Slobodan. Serverless Applications with Node.js Using AWS Lambda and Claudia.js. Manning. ISBN   9781638356172.
  16. "Lambda Live Debugger". GitHub . Archived from the original on 2024-10-07. Retrieved 2024-10-04.
  17. "Archived copy". Archived from the original on 2024-11-15. Retrieved 2024-11-04.{{cite web}}: CS1 maint: archived copy as title (link)
  18. "Archived copy". Archived from the original on 2024-03-15. Retrieved 2024-11-04.{{cite web}}: CS1 maint: archived copy as title (link)
  19. "Archived copy". Archived from the original on 2024-04-05. Retrieved 2024-11-04.{{cite web}}: CS1 maint: archived copy as title (link)