BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News AWS Introduces Amazon Linux 2023 Runtime for Lambda

AWS Introduces Amazon Linux 2023 Runtime for Lambda

This item in japanese

AWS recently introduced Amazon Linux 2023 (AL2023) as a managed runtime and container base image for its Lambda service. The runtime provides an OS-only environment for developers to run Lambda functions.

Compared to the Amazon Linux 2 runtimes, AL2023 has a significantly smaller deployment footprint, provides updated versions of common libraries such as glibc, and has a new package manager. In addition, the company states that AL2023 will also be used as the basis for future Lambda runtime releases, such as Node.js 20, Python 3.12, Java 21, and .NET 8.

Overview of AL2023 (Source: Amazon Website)

Rakshith Rao, senior solutions architect, explains what the AL2023 OS-only environment is:

Lambda provides managed runtimes for Java, Python, Node.js, .NET, and Ruby. However, if you want to develop your Lambda functions in programming languages that are not supported by Lambda’s managed language runtimes, the "provided" runtime family provides an OS-only environment in which you can run code written in any language. This release extends the provided runtime family to support Amazon Linux 2023.

Developers can use OS-only runtimes in three scenarios:

  • Firstly, with languages like Go, Rust, C++, .NET Native AOT, and Java GraalVM Native, where only the compiled binary is uploaded to Lambda, requiring only an OS environment for execution
  • Secondly, to facilitate the use of third-party language runtimes such as Bref for PHP or Swift AWS Lambda Runtime for Swift-based Lambda functions
  • And lastly, to deploy custom runtimes for languages or versions not covered by Lambda's managed runtimes, as exemplified by Node.js 19, where Lambda only supports LTS releases

In case developers want to use the AL2023 custom runtime, they can either navigate to the Create function page in the Lambda console and select Provide your own bootstrap on Amazon Linux 2023 as the Runtime value, or use the AWS SAM template to build and deploy your Lambda function, use the provided.al2023 as the value of the Runtime. An example would look like:

Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: hello-world/
      Handler: my.bootstrap.file
      Runtime: provided.al2023

Furthermore, they can migrate from AL2 custom runtime-based Lambda functions to AL2023.

Mark Wolfe, engineering lead at Stax, tweets:

Great to see a smaller docker base image for AWS lambda, although, to be honest, I am not sure why this post mentions php and swift in passing... If you haven't migrated to al2 from go1.x, you can now skip to al2023

Lastly, AL2023 is currently available in all regions where Lambda is known, except for China and GovCloud Regions.

About the Author

Rate this Article

Adoption
Style

BT