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 nodejs20.x or python3.12. 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.

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, such as Go or Rust, use an OS-only runtime. The Lambda execution environment provides a runtime interface for getting invocation events and sending responses. You can deploy other languages by implementing a custom runtime alongside your function code, or in a layer.

Supported runtimes

The following table lists the supported Lambda runtimes and projected deprecation dates. After a runtime is deprecated, you're still able to create and update functions for a limited period. For more information, see Runtime use after deprecation. The table provides the currently forecasted dates for runtime deprecation. These dates are provided for planning purposes and are subject to change.

Supported Runtimes
Name Identifier Operating system Deprecation date Block function create Block function update

Node.js 20

nodejs20.x

Amazon Linux 2023

Node.js 18

nodejs18.x

Amazon Linux 2

Node.js 16

nodejs16.x

Amazon Linux 2

Jun 12, 2024

Feb 28, 2025

Mar 31, 2025

Python 3.12

python3.12

Amazon Linux 2023

Python 3.11

python3.11

Amazon Linux 2

Python 3.10

python3.10

Amazon Linux 2

Python 3.9

python3.9

Amazon Linux 2

Python 3.8

python3.8

Amazon Linux 2

Oct 14, 2024

Feb 28, 2025

Mar 31, 2025

Java 21

java21

Amazon Linux 2023

Java 17

java17

Amazon Linux 2

Java 11

java11

Amazon Linux 2

Java 8

java8.al2

Amazon Linux 2

.NET 8

dotnet8

Amazon Linux 2023

.NET 6

dotnet6

Amazon Linux 2

Nov 12, 2024

Feb 28, 2025

Mar 31, 2025

Ruby 3.3

ruby3.3

Amazon Linux 2023

Ruby 3.2

ruby3.2

Amazon Linux 2

OS-only Runtime

provided.al2023

Amazon Linux 2023

OS-only Runtime

provided.al2

Amazon Linux 2

Note

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

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

Lambda continues to support the Go programming language after deprecation of the Go 1.x runtime. For more information, see Migrating Amazon Lambda functions from the Go1.x runtime to the custom runtime on Amazon Linux 2 on the Amazon Compute Blog.

All supported Lambda runtimes support both x86_64 and arm64 architectures.

New runtime releases

Lambda provides managed runtimes for new language versions only when the release reaches the long-term support (LTS) phase of the language's release cycle. For example, for the Node.js release cycle, when the release reaches the Active LTS phase.

Before the release reaches the long-term support phase, it remains in development and can still be subject to breaking changes. Lambda applies runtime updates automatically by default, so breaking changes to a runtime version could stop your functions from working as expected.

Lambda doesn't provide managed runtimes for language versions which aren't scheduled for LTS release.

The following list shows the target launch month for upcoming Lambda runtimes. These dates are indicative only and subject to change.

  • Python 3.13 - November 2024

  • Node.js 22 - November 2024

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. Lambda’s standard deprecation policy is to deprecate a runtime when any major component of the runtime reaches the end of community long-term support (LTS) and security updates are no longer available. Most usually, this is the language runtime, though in some cases, a runtime can be deprecated because the operating system (OS) reaches end of LTS.

After a runtime is deprecated, Amazon may no longer apply security patches or updates to that runtime, and functions using that runtime are no longer eligible for technical support. Such deprecated runtimes are provided ‘as-is’, without any warranties, and may contain bugs, errors, defects, or other vulnerabilities.

To learn more about managing runtime upgrades and deprecation, see the following sections and Managing Amazon Lambda runtime upgrades on the Amazon Compute Blog.

Important

Lambda occasionally delays deprecation of a Lambda runtime for a limited period beyond the end of support date of the language version that the runtime supports. During this period, Lambda only applies security patches to the runtime OS. Lambda doesn’t apply security patches to programming language runtimes after they reach their end of support date.

Runtime deprecation for Node.js 16

In response to customer feedback, Amazon is delaying the deprecation of the Node.js 16 runtime until 9 months after the end of community LTS. The Node.js 16 runtime will be deprecated on the date provided in the Supported Runtimes table. As stated in the preceding note, between the end of LTS on September 11, 2023 and the deprecation date, Lambda will only apply OS patches to the runtime. No security patches for the language runtime will be applied during this period.

Delaying the deprecation of Node.js 16 gives customers using this runtime the opportunity to migrate their functions directly to Node.js 20, skipping Node.js 18.

Shared responsibility model

Lambda is responsible for curating and publishing security updates for all supported managed runtimes and container base images. By default, Lambda will apply these updates automatically to functions using managed runtimes. Where the default automatic runtime update setting has been changed, see the runtime management controls shared responsibility model. For functions deployed using container images, you're responsible for rebuilding your function's container image from the latest base image and redeploying the container image.

When a runtime is deprecated, Lambda’s responsibility for updating the managed runtime and container base images ceases. You are responsible for upgrading your functions to use a supported runtime or base image.

In all cases, you are responsible for applying updates to your function code, including its dependencies. Your responsibilities under the shared responsibility model are summarized in the following table.

Runtime lifecycle phase Lambda's responsibilities Your responsibilities
Supported managed runtime

Provide regular runtime updates with security patches and other updates.

Apply runtime updates automatically by default (see Runtime management controls for non-default behaviors).

Update your function code, including dependencies, to address any security vulnerabilities.
Supported container image Provide regular updates to container base image with security patches and other updates.

Update your function code, including dependencies, to address any security vulnerabilities.

Regularly re-build and re-deploy your container image using the latest base image.

Managed runtime approaching deprecation

Notify customers prior to runtime deprecation via documentation, Amazon Health Dashboard, email, and Trusted Advisor.

Responsibility for runtime updates ends at deprecation.

Monitor Lambda documentation, Amazon Health Dashboard, email, or Trusted Advisor for runtime deprecation information.

Upgrade functions to a supported runtime before the previous runtime is deprecated.

Container image approaching deprecation

Deprecation notifications are not available for functions using container images.

Responsibility for container base image updates ends at deprecation.

Be aware of deprecation schedules and upgrade functions to a supported base image before the previous image is deprecated.

Runtime use after deprecation

After a runtime is deprecated, Amazon may no longer apply security patches or updates to that runtime, and functions using that runtime are no longer eligible for technical support. Such deprecated runtimes are provided ‘as-is’, without any warranties, and may contain bugs, errors, defects, or other vulnerabilities. Functions that use a deprecated runtime may also experience degraded performance or other issues, such as a certificate expiry, that can cause them to stop working properly.

For at least 30 days after a runtime is deprecated, you’re still able to create new Lambda functions using that runtime. Starting from 30 days after deprecation, Lambda begins blocking the creation of new functions.

For at least 60 days after a runtime is deprecated, you’re still able to update function code and configuration for existing functions. Starting from 60 days after deprecation, Lambda begins blocking the update of function code and configuration for existing functions.

Note

For some runtimes, Amazon is delaying the block-function-create and block-function-update dates beyond the usual 30 and 60 days after deprecation. Amazon has made this change in response to customer feedback to give you more time to upgrade your functions. Refer to the tables in Supported runtimes and Deprecated runtimes to see the dates for your runtime.

You can update a function to use a newer supported runtime indefinitely after a runtime is deprecated. You should test that your function works with the new runtime before applying the runtime change in production environments, since you will not be able to revert to the deprecated runtime once the 60-day period has passed. We recommend using function versions and aliases to enable safe deployment with rollback.

Note that the exact length of time for which you can continue to create and update functions isn’t fixed. This period can vary for each deprecation and for different Amazon Web Services Regions. Nominal dates for the blocking of function creates and updates are provided in the Supported Runtimes table in the first section of this page. Lambda will not start blocking function creates or updates before the dates given in this table.

You can continue to invoke your functions indefinitely after the runtime is deprecated. However, Amazon strongly recommends that you migrate functions to a supported runtime so that your functions continue to receive security patches and remain eligible for technical support.

Receiving runtime deprecation notifications

When a runtime approaches its deprecation date, Lambda sends you an email alert if any functions in your Amazon Web Services account use that runtime. Notifications are also displayed in the Amazon Health Dashboard and in Amazon Trusted Advisor.

  • Receiving email notifications:

    Lambda sends you an email alert at least 180 days before a runtime is deprecated. This email lists the $LATEST versions of all functions using the runtime. To see a full list of affected function versions, use Trusted Advisor or see Listing functions that use a deprecated runtime.

    Lambda sends email notification to your Amazon Web Services account's primary account contact. For information about viewing or updating the email addresses in your account, see Updating contact information in the Amazon General Reference.

  • Receiving notifications through the Amazon Health Dashboard:

    The Amazon Health Dashboard displays a notification at least 180 days before a runtime is deprecated. Notifications appear on the Your account health page under Other notifications. The Affected resources tab of the notification lists the $LATEST versions of all functions using the runtime.

    Note

    To see a full and up-to-date list of affected function versions, use Trusted Advisor or see Listing functions that use a deprecated runtime.

    Amazon Health Dashboard notifications expire 90 days after the affected runtime is deprecated.

  • Using Amazon Trusted Advisor

    Trusted Advisor displays a notification 180 days before a runtime is deprecated. Notifications appear on the Security page. A list of your affected functions is displayed under Amazon Lambda Functions Using Deprecated Runtimes. This list of functions shows both $LATEST and published versions and updates automatically to reflect your functions' current status.

    You can turn on weekly email notifications from Trusted Advisor in the Preferences page of the Trusted Advisor console.

Listing functions that use a deprecated runtime

In addition to using Trusted Advisor to see a live list of functions affected by scheduled runtime deprecations, you can also use the Amazon Command Line Interface (Amazon CLI) or one of the Amazon SDKs to list all of your function versions that use a particular runtime.

To generate this list using the Amazon CLI, run the following command. Replace RUNTIME_IDENTIFIER with the name of the runtime that’s being deprecated and choose your own Amazon Web Services Region. To list only $LATEST function versions, omit --function-version ALL from the command.

aws lambda list-functions --function-version ALL --region us-east-1 --output text --query "Functions[?Runtime=='RUNTIME_IDENTIFIER'].FunctionArn"
Tip

The example command lists functions in the us-east-1 region for a particular Amazon Web Services account You’ll need to repeat this command for each region in which your account has functions and for each of your Amazon Web Services accounts.

To learn more about using an Amazon SDK to list your functions using the ListFunctions action, see the SDK documentation for your preferred programming language. You can also use one of the Amazon SDKs to gather statistics about your most-invoked and most-recently-invoked functions using the DescribeLogStreams and GetMetricStatistics API actions.

You can also use the Amazon Config Advanced queries feature to list all your functions that use an affected runtime. This query only returns function $LATEST versions, but you can aggregate queries to list function across all regions and multiple Amazon Web Services accounts with a single command. To learn more, see Querying the Current Configuration State of Amazon Auto Scaling Resources in the Amazon Config Developer Guide.

Deprecated runtimes

The following runtimes have reached end of support:

Deprecated runtimes
Name Identifier Operating system Deprecation date Block function create Block function update

.NET 7 (container only)

dotnet7

Amazon Linux 2

May 14, 2024

Java 8

java8

Amazon Linux

Jan 8, 2024

Feb 8, 2024

Feb 28, 2025

Go 1.x

go1.x

Amazon Linux

Jan 8, 2024

Feb 8, 2024

Feb 28, 2025

OS-only Runtime

provided

Amazon Linux

Jan 8, 2024

Feb 8, 2024

Feb 28, 2025

Ruby 2.7

ruby2.7

Amazon Linux 2

Dec 7, 2023

Jan 9, 2024

Feb 28, 2025

Node.js 14

nodejs14.x

Amazon Linux 2

Dec 4, 2023

Jan 9, 2024

Feb 28, 2025

Python 3.7

python3.7

Amazon Linux

Dec 4, 2023

Jan 9, 2024

Feb 28, 2025

.NET Core 3.1

dotnetcore3.1

Amazon Linux 2

Apr 3, 2023

Apr 3, 2023

May 3, 2023

Node.js 12

nodejs12.x

Amazon Linux 2

Mar 31, 2023

Mar 31, 2023

Apr 30, 2023

Python 3.6

python3.6

Amazon Linux

Jul 18, 2022

Jul 18, 2022

Aug 29, 2022

.NET 5 (container only)

dotnet5.0

Amazon Linux 2

May 10, 2022

.NET Core 2.1

dotnetcore2.1

Amazon Linux

Jan 5, 2022

Jan 5, 2022

Apr 13, 2022

Node.js 10

nodejs10.x

Amazon Linux 2

Jul 30, 2021

Jul 30, 2021

Feb 14, 2022

Ruby 2.5

ruby2.5

Amazon Linux

Jul 30, 2021

Jul 30, 2021

Mar 31, 2022

Python 2.7

python2.7

Amazon Linux

Jul 15, 2021

Jul 15, 2021

May 30, 2022

Node.js 8.10

nodejs8.10

Amazon Linux

Mar 6, 2020

Mar 6, 2020

Node.js 4.3

nodejs4.3

Amazon Linux

Mar 5, 2020

Mar 5, 2020

Node.js 4.3 edge

nodejs4.3-edge

Amazon Linux

Mar 5, 2020

Apr 30, 2019

Node.js 6.10

nodejs6.10

Amazon Linux

Aug 12, 2019

Aug 12, 2019

.NET Core 1.0

dotnetcore1.0

Amazon Linux

Jun 27, 2019

Jul 30, 2019

.NET Core 2.0

dotnetcore2.0

Amazon Linux

May 30, 2019

May 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 following links give end-of-life schedules for each language that Lambda supports as a managed runtime.

Language and framework support policies