Lambda runtimes - Amazon Lambda
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Lambda runtimes

Lambda supports multiple languages through the use of runtimes. A runtime provides a language-specific environment that relays invocation events, context information, and responses between Lambda and the function. You can use runtimes that Lambda provides, or build your own.

Each major programming language release has a separate runtime, with a unique runtime identifier, such as python3.10 or nodejs18.x. To configure a function to use a new major language version, you need to change the runtime identifier. Since Amazon Lambda cannot guarantee backward compatibility between major versions, this is a customer-driven operation.

For a function defined as a container image, you choose a runtime and the Linux distribution when you create the container image. To change the runtime, you create a new container image.

When you use a .zip file archive for the deployment package, you choose a runtime when you create the function. To change the runtime, you can update your function's configuration. The runtime is paired with one of the Amazon Linux distributions. The underlying execution environment provides additional libraries and environment variables that you can access from your function code.

Amazon Linux 2
  • Image – Custom

  • Linux kernel – 4.14

Amazon Linux

Lambda invokes your function in an execution environment. The execution environment provides a secure and isolated runtime environment that manages the resources required to run your function. Lambda re-uses the execution environment from a previous invocation if one is available, or it can create a new execution environment.

To use other languages in Lambda, you can implement a custom runtime. The Lambda execution environment provides a runtime interface for getting invocation events and sending responses. You can deploy a custom runtime alongside your function code, or in a layer.

Note

For new regions, Lambda will not support runtimes that are set to be deprecated within the next six months.

Supported Runtimes
Name Identifier SDK Operating system Architectures Deprecation (Phase 1)

Node.js 18

nodejs18.x

3.188.0

Amazon Linux 2

x86_64, arm64

Node.js 16

nodejs16.x

2.1374.0

Amazon Linux 2

x86_64, arm64

Mar 11, 2024

Node.js 14

nodejs14.x

2.1374.0

Amazon Linux 2

x86_64, arm64

Nov 27, 2023

Python 3.11

python3.11

boto3-1.27.1 botocore-1.30.1

Amazon Linux 2

x86_64, arm64

Python 3.10

python3.10

boto3-1.26.90 botocore-1.29.90

Amazon Linux 2

x86_64, arm64

Python 3.9

python3.9

boto3-1.26.90 botocore-1.29.90

Amazon Linux 2

x86_64, arm64

Python 3.8

python3.8

boto3-1.26.90 botocore-1.29.90

Amazon Linux 2

x86_64, arm64

Python 3.7

python3.7

boto3-1.26.90 botocore-1.29.90

Amazon Linux

x86_64

Nov 27, 2023

Java 17

java17

Amazon Linux 2

x86_64, arm64

Java 11

java11

Amazon Linux 2

x86_64, arm64

Java 8

java8.al2

Amazon Linux 2

x86_64, arm64

Java 8

java8

Amazon Linux

x86_64

Dec 31, 2023

.NET 7 (container only)

dotnet7

Amazon Linux 2

x86_64, arm64

May 14, 2024

.NET 6

dotnet6

Amazon Linux 2

x86_64, arm64

Go 1.x

go1.x

Amazon Linux

x86_64

Dec 31, 2023

Ruby 3.2

ruby3.2

3.1.0

Amazon Linux 2

x86_64, arm64

Ruby 2.7

ruby2.7

3.1.0

Amazon Linux 2

x86_64, arm64

Dec 7, 2023

Custom Runtime

provided.al2

Amazon Linux 2

x86_64, arm64

Custom Runtime

provided

Amazon Linux

x86_64

Dec 31, 2023

Lambda keeps managed runtimes up to date with patches and support for minor version releases. For more information see Lambda runtime updates.

Runtime deprecation policy

Lambda runtimes for .zip file archives are built around a combination of operating system, programming language, and software libraries that are subject to maintenance and security updates. When security updates are no longer available for a component of a runtime, Lambda deprecates the runtime.

Deprecation (end of support) for a runtime occurs in two phases.

Phase 1 - Lambda no longer applies security patches or other updates to the runtime. You can no longer create functions that use the runtime, but you can continue to update existing functions. This includes updating the runtime, and rolling back to the previous runtime. Note that functions that use a deprecated runtime are no longer eligible for technical support.

Phase 2 - you can no longer create or update functions that use the runtime. To update a function, you need to migrate it to a supported runtime. After you migrate the function to a supported runtime, you cannot rollback the function to the previous runtime. Phase 2 starts at least 30 days after the start of Phase 1.

Lambda does not block invocations of functions that use deprecated runtime. Function invocations continue indefinitely after the runtime reaches end of support. However, Amazon strongly recommends that you migrate functions to a supported runtime so that you continue to receive security patches and remain eligible for technical support.

In the table below, each phase starts at midnight (Pacific time zone) on the specified date. The following runtimes have reached end of support:

Deprecated runtimes
Name Identifier Operating system Deprecation Phase 1 Deprecation Phase 2

.NET Core 3.1

dotnetcore3.1

Amazon Linux 2

Apr 3, 2023

May 3, 2023

Node.js 12

nodejs12.x

Amazon Linux 2

Mar 31, 2023

Apr 30, 2023

Python 3.6

python3.6

Amazon Linux

Jul 18, 2022

Aug 29, 2022

Python 2.7

python2.7

Amazon Linux

Jul 15, 2021

May 30, 2022

.NET 5 (container only)

dotnet5.0

Amazon Linux 2

May 10, 2022

May 10, 2022

.NET Core 2.1

dotnetcore2.1

Amazon Linux

Jan 5, 2022

Apr 13, 2022

Ruby 2.5

ruby2.5

Amazon Linux

Jul 30, 2021

Mar 31, 2022

Node.js 10

nodejs10.x

Amazon Linux 2

Jul 30, 2021

Feb 14, 2022

Node.js 8.10

nodejs8.10

Amazon Linux

Mar 6, 2020

Node.js 4.3

nodejs4.3

Amazon Linux

Mar 5, 2020

Node.js 6.10

nodejs6.10

Amazon Linux

Aug 12, 2019

.NET Core 1.0

dotnetcore1.0

Amazon Linux

Jul 30, 2019

.NET Core 2.0

dotnetcore2.0

Amazon Linux

May 30, 2019

Node.js 4.3 edge

nodejs4.3-edge

Amazon Linux

Apr 30, 2019

Node.js 0.10

nodejs

Amazon Linux

Oct 31, 2016

In almost all cases, the end-of-life date of a language version or operating system is known well in advance. The links below give end-of-life schedules for each language that Lambda supports as a managed runtime. In addition, Trusted Advisor includes a check that provides 120 days' notice of upcoming Lambda runtime end of support, and Lambda notifies you by email if you have functions using a runtime that is scheduled for end of support in the next 60 days.

Language and framework support policies
Topics