AWS Lambda makes it easy to deploy applications without managing servers, but that does not mean developers can ignore the software environment in which their functions execute.
Every Lambda function depends on a runtime that provides the language environment, operating system integration, libraries, and other components required to execute the application.
These components evolve over time. Programming languages release new major versions, operating systems reach end of support, and AWS eventually retires older Lambda runtimes.
If an application continues using an outdated runtime, it can lose access to security updates and technical support. Eventually, AWS may also restrict the creation or modification of functions using that runtime.
The problem is that runtime upgrades are not always visible in everyday development work. A function can continue running successfully even when its runtime is approaching deprecation.
For teams managing dozens or hundreds of Lambda functions, discovering these dependencies manually is difficult.
AWS provides runtime deprecation notifications, AWS Health, Trusted Advisor, and CLI APIs that help identify affected functions. Developers can also integrate runtime inventory checks into CI/CD pipelines to detect upgrade requirements before they become deployment problems.
This article explains how Lambda runtime upgrades work, how to identify affected functions, and how to build a practical process for managing runtime changes across AWS environments.
Understanding AWS Lambda Runtime Upgrades
A Lambda runtime provides the environment required to execute a function.
For example, a Python function might use the python3.13 runtime, while a Node.js application might use nodejs22.x.
The runtime identifier specifies the major language version and the associated Lambda execution environment.
When AWS releases a new major language runtime, it does not automatically move every existing function to that new major version.
For example, moving from Python 3.12 to Python 3.13 requires an application owner to change the function's runtime configuration and verify that the application works with the newer version.
The same applies to Node.js, Java, .NET, and other supported languages.
It is important to distinguish between two types of runtime changes.
Runtime version updates
AWS periodically publishes new runtime versions containing security patches, bug fixes, performance improvements, and updates to runtime components.
These updates happen within the same major runtime identifier.
For example, a function using python3.13 can receive a newer Lambda runtime version without changing its configured runtime identifier.
Lambda manages these updates according to the function's runtime update mode.
Major runtime upgrades
A major runtime upgrade changes the configured language runtime.
For example:
- Python 3.12 to Python 3.13
- Node.js 20 to Node.js 22
- Java 17 to Java 21
- .NET 8 to .NET 10
These upgrades may introduce language changes, library incompatibilities, or differences in the underlying operating system.
The application owner must plan and test these changes.
Understanding this distinction is essential because automatic runtime patching does not automatically migrate an application from one major language version to another.
Why Runtime Deprecation Can Become a Production Problem
Runtime deprecation is more than a maintenance notification.
When a Lambda runtime reaches its deprecation date, AWS may stop providing security patches and other updates for that runtime. Functions using it are also no longer eligible for technical support.
AWS follows a staged deprecation process.
The general lifecycle includes:
Lifecycle stage | What happens |
|---|
Deprecation notice | AWS notifies affected accounts before the planned deprecation |
Deprecation | Security updates and technical support may stop |
Block function creation | AWS begins restricting creation of new functions using the runtime |
Block function updates | AWS begins restricting code and configuration updates for existing functions |
AWS provides at least 180 days of notice before runtime deprecation under its documented policy.
The exact dates for blocking function creation and updates vary by runtime and may be extended.
Importantly, reaching the deprecation date does not necessarily mean that an existing function immediately stops executing. AWS generally allows existing functions to continue running, but continuing to use an unsupported runtime introduces security, maintenance, and compatibility risks.
For example, consider an application that still uses an older Python runtime.
The function may continue processing requests successfully, but its dependencies may eventually require newer language features or operating-system libraries.
The application may also depend on certificates or system components that become outdated.
Waiting until AWS blocks updates is therefore a poor migration strategy.
The goal should be to identify affected functions early enough to test and deploy a supported runtime before the deprecation deadline.
Checking Supported and Deprecated Lambda Runtimes
AWS maintains an official runtime support page containing supported runtimes, runtime identifiers, operating systems, and projected deprecation dates.
The page is particularly useful when planning upgrades across different programming languages.
For example, an engineering team can use it to answer questions such as:
- Which Python runtimes are still supported?
- Which Node.js versions are approaching deprecation?
- Is a runtime based on Amazon Linux 2 or Amazon Linux 2023?
- When will AWS begin blocking new functions using an older runtime?
- Which runtime should replace the existing one?
The operating system matters because Lambda runtimes combine a language environment with an underlying Amazon Linux distribution.
For example, moving from an Amazon Linux 2-based runtime to an Amazon Linux 2023-based runtime can involve more than changing a language version.
Native dependencies, shared libraries, build environments, and operating-system packages may also need attention.
Do not rely on an old runtime schedule copied into a project document. AWS's published runtime table is the authoritative source for current dates, and those dates can change.
Finding Lambda Functions That Use an Old Runtime
One of the most useful ways to prepare for runtime upgrades is to create a complete inventory of Lambda functions.
The AWS CLI provides the list-functions command for retrieving function configuration.
Start by listing functions in a Region:
aws lambda list-functions \
--region us-east-1 \
--query 'Functions[*].[FunctionName,Runtime]' \
--output table
The output contains function names and their configured runtime identifiers.
For example:
------------------------------------
| ListFunctions |
+----------------------+-----------+
| customer-api | python3.12|
| order-processor | nodejs20.x|
| invoice-generator | java17 |
| notification-worker | python3.13|
+----------------------+-----------+
This provides a basic view of the runtime distribution in the selected Region.
However, a large AWS environment may contain functions in several Regions and accounts.
A single command against one Region is not enough for a complete inventory.
Filtering functions by runtime
Suppose the development team wants to identify all functions using Python 3.12.
Use the following command:
aws lambda list-functions \
--region us-east-1 \
--query "Functions[?Runtime=='python3.12'].[FunctionName,Runtime]" \
--output table
The query filters the returned function configurations by runtime identifier.
This makes it easier to create an upgrade list for a specific language version.
Including published function versions
A function can have multiple published versions, and different versions can have different configurations.
Therefore, checking only the default function configuration may not provide the complete picture.
Use the ALL option:
aws lambda list-functions \
--function-version ALL \
--region us-east-1 \
--query "Functions[?Runtime=='python3.12'].[FunctionName,Version,Runtime]" \
--output table
This requests both the unpublished configuration and published versions.
The distinction is important when production traffic uses published versions through aliases while the latest development configuration has already been upgraded.
An inventory should account for the versions that are actually used by the application.
Automating Runtime Inventory Across Multiple Regions
For organizations managing several Lambda environments, manually executing commands in every Region is inefficient.
A simple shell script can collect runtime information across all enabled Regions.
#!/bin/bash
REGIONS=$(aws ec2 describe-regions \
--query 'Regions[].RegionName' \
--output text)
for REGION in $REGIONS
do
echo "Checking Region: $REGION"
aws lambda list-functions \
--region "$REGION" \
--function-version ALL \
--query 'Functions[*].[FunctionName,Version,Runtime]' \
--output table
done
The script retrieves the available Regions and lists Lambda function versions in each one.
For an organization using multiple AWS accounts, run the inventory through each account's approved AWS profile or role.
For example:
#!/bin/bash
PROFILE="development"
REGIONS=$(aws ec2 describe-regions \
--profile "$PROFILE" \
--query 'Regions[].RegionName' \
--output text)
for REGION in $REGIONS
do
echo "Checking $PROFILE in $REGION"
aws lambda list-functions \
--profile "$PROFILE" \
--region "$REGION" \
--function-version ALL \
--query 'Functions[*].[FunctionName,Version,Runtime]' \
--output table
done
This provides a useful starting point for building an organization-wide runtime inventory.
For a production inventory tool, also account for pagination, access-denied errors, disabled Regions, and functions that use container images or custom runtimes.
The AWS CLI automatically handles pagination in normal command usage unless pagination is disabled. If implementing the inventory through an SDK, make sure the code follows the service's pagination tokens rather than assuming one response contains every function.
Using AWS Health and Trusted Advisor for Deprecation Notifications
AWS also provides managed notifications for runtime deprecation.
When a Lambda runtime approaches its deprecation date, AWS sends notifications to affected accounts.
These notifications are available through:
- Email notifications to the account's primary contact.
- AWS Health Dashboard.
- AWS Trusted Advisor.
The notification period begins at least 180 days before deprecation.
The Health Dashboard identifies affected resources and displays scheduled changes.
Trusted Advisor provides a deprecated Lambda runtime check that can identify affected functions, including published versions.
This is useful because a function's latest configuration may use a supported runtime while an older published version still uses the deprecated one.
For example, a developer might update the latest version of an order-processing function to Python 3.13 but leave an older published version using Python 3.10.
If an alias still points to that older version, production traffic may continue using the outdated runtime.
Checking only the latest configuration would miss this situation.
For larger environments, combine these AWS notifications with a periodic inventory report rather than relying exclusively on email alerts.
Understanding Lambda Runtime Update Modes
Runtime deprecation is not the only issue developers need to monitor.
AWS also publishes new runtime versions containing patches and security improvements.
For Lambda-managed runtimes, developers can choose how these runtime version updates are applied.
AWS provides three runtime update modes.
Mode | Behavior | Typical use |
|---|
Auto | Lambda applies the latest runtime version automatically | Recommended for most functions |
Function update | Lambda applies the latest runtime version when the function is updated | Teams that synchronize runtime updates with deployments |
Manual | The function uses a specified runtime version | Temporary rollback when an update causes incompatibility |
Auto is the default mode.
Lambda uses a two-phase rollout process for automatic runtime updates.
During the first phase, functions receive the new runtime version when they are created or updated.
During the second phase, Lambda updates remaining functions configured for Auto mode.
This approach gives actively maintained functions an opportunity to encounter the new runtime version during normal deployment activity, while less frequently updated functions still receive the patch automatically.
Function update mode provides more control over when a function receives the new runtime version.
However, developers must regularly update the function to avoid falling behind on runtime patches.
Manual mode should generally be used only as a temporary mitigation when a new runtime version causes an incompatibility.
It should not become a permanent strategy for avoiding runtime updates.
Checking and Configuring Runtime Update Settings
Developers can inspect runtime update settings through the AWS Lambda console or CLI.
To configure a function to use the Auto mode:
aws lambda put-runtime-management-config \
--function-name order-processor \
--update-runtime-on Auto \
--region us-east-1
To use Function update mode:
aws lambda put-runtime-management-config \
--function-name order-processor \
--update-runtime-on FunctionUpdate \
--region us-east-1
To inspect the current runtime management configuration, use:
aws lambda get-runtime-management-config \
--function-name order-processor \
--region us-east-1
The command returns information about the selected update mode and runtime version configuration.
These settings can be configured separately for each function version.
This is important when an application uses aliases and published versions for production deployments.
Also remember that changing the runtime update mode does not change the configured language runtime. For example, selecting Auto does not migrate a Python 3.12 function to Python 3.13.
It only controls how Lambda applies new runtime versions within the existing runtime.
Identifying Runtime Version Changes in Function Logs
Runtime identifiers and runtime version numbers describe different things.
Consider these two values:
Runtime identifier: python3.13
Runtime version: A specific Lambda runtime build
The runtime identifier represents the major language runtime selected by the developer.
The runtime version identifies a particular Lambda-managed runtime build containing its implementation and associated components.
AWS exposes the runtime version ARN in the Lambda console and in the INIT_START log line.
For example, a log entry can contain information similar to:
INIT_START Runtime Version: python:3.13.vXX
The exact version information varies by runtime.
Monitoring these values can help identify when Lambda has moved a function to a newer runtime build.
For applications with strict deployment requirements, collecting runtime version information from logs can help compare environments and investigate changes in behavior.
Do not confuse runtime version changes with major language upgrades. A function can receive a new runtime build while continuing to use the same language runtime identifier.
Preparing Applications for a Major Runtime Upgrade
Once the inventory identifies an outdated runtime, the next step is application compatibility testing.
Changing a runtime identifier is a relatively small configuration operation, but the application may depend on behavior that changes between language versions.
Consider a Python Lambda function:
import json
import boto3
def lambda_handler(event, context):
client = boto3.client("s3")
response = client.list_buckets()
return {
"statusCode": 200,
"body": json.dumps({
"bucketCount": len(response["Buckets"])
})
}
The application may appear simple, but its behavior depends on the Python runtime, AWS SDK version, dependencies, and operating-system environment.
Before moving to another runtime, check the following areas.
Language and library compatibility
Review the language release notes and test third-party dependencies.
A newer Python, Node.js, Java, or .NET version may introduce changes that affect application behavior.
Pay particular attention to packages that contain native extensions or depend on operating-system libraries.
AWS SDK dependencies
AWS recommends packaging the SDK modules used by your application rather than relying unnecessarily on runtime-included SDK versions.
For example, Python applications should manage compatible versions of boto3 and botocore together.
This helps maintain control over dependency versions when Lambda updates its runtime.
Operating-system changes
A move from Amazon Linux 2 to Amazon Linux 2023 may affect native dependencies, shared libraries, build tools, and system packages.
Rebuild native dependencies using an environment compatible with the target Lambda runtime.
For Python applications, this may mean rebuilding packages with native extensions.
For Node.js applications, it may require rebuilding native modules for the correct operating system and architecture.
Environment variables and initialization
Check initialization code, environment variables, certificates, and external service connections.
Lambda execution environments can be reused across invocations, so initialization and connection-management behavior should also be tested.
Performance and memory behavior
A new runtime may change startup time, memory consumption, or execution characteristics.
Run representative tests using the same memory configuration and workload as the production function.
Do not assume that a successful deployment automatically means the function performs identically.
Deploying Runtime Upgrades Safely
A production runtime migration should not depend on updating every function directly in the live environment.
A safer approach is to test the new runtime using a separate function version or deployment environment.
For example, a team can follow this process:
Identify functions using an old runtime
|
v
Select a supported replacement runtime
|
v
Update dependencies and application code
|
v
Deploy to a test environment
|
v
Run automated and integration tests
|
v
Publish a new Lambda version
|
v
Move a test alias to the new version
|
v
Monitor errors, latency, and execution metrics
|
v
Promote the new version to production
Lambda versions and aliases provide a useful foundation for this workflow.
For example, a function can have a production alias pointing to one published version while a test alias points to another.
This allows the team to validate the upgraded runtime without immediately replacing the version receiving production traffic.
For applications with strict availability requirements, consider gradual traffic shifting through an appropriate deployment strategy.
If the new version behaves unexpectedly, the alias can be moved back to a previously tested version, provided that version remains usable.
Handling Lambda Functions Deployed as Container Images
Not every Lambda function uses a ZIP deployment package with a managed runtime identifier.
Some functions use container images.
For these functions, the runtime and operating system are defined by the container image.
AWS publishes updated Lambda base images, but it does not automatically rebuild and redeploy customer container images.
The application owner must:
- Update the base image reference.
- Rebuild the application image.
- Run compatibility tests.
- Scan the resulting image.
- Push the updated image to the container registry.
- Update the Lambda function to use the new image.
For example, a Dockerfile might contain:
FROM public.ecr.aws/lambda/python:3.13
COPY requirements.txt ${LAMBDA_TASK_ROOT}
RUN pip install \
-r requirements.txt \
--target "${LAMBDA_TASK_ROOT}"
COPY app.py ${LAMBDA_TASK_ROOT}
CMD ["app.lambda_handler"]
When moving to another supported Python runtime, update the base image and validate all dependencies against the new environment.
A successful application build is not enough. Test the resulting image using the Lambda runtime interface and representative invocation events.
The same responsibility applies to custom runtimes: the runtime publisher and function owner must coordinate runtime updates according to their respective responsibilities.
Adding Runtime Checks to CI/CD Pipelines
The most effective way to prevent runtime upgrades from becoming emergency work is to include runtime checks in the development pipeline.
For example, a CI pipeline can inspect the Lambda runtime declared in the deployment configuration.
A simplified Python check might look like this:
import json
import sys
SUPPORTED_RUNTIMES = {
"python3.13",
"python3.14"
}
with open("lambda-config.json", "r") as file:
config = json.load(file)
runtime = config.get("Runtime")
if runtime not in SUPPORTED_RUNTIMES:
print(f"Unsupported or unapproved runtime: {runtime}")
sys.exit(1)
print(f"Runtime check passed: {runtime}")
This example uses a locally maintained allowlist.
For a real production pipeline, do not treat a hardcoded list as the authoritative AWS runtime schedule. Maintain the list through an approved policy or an automated process that checks current AWS runtime support information.
A more complete pipeline should:
- Check runtime identifiers in infrastructure templates.
- Detect deprecated or approaching-deprecation runtimes.
- Review dependency compatibility.
- Build deployment packages using the target runtime environment.
- Execute unit and integration tests.
- Verify runtime configuration after deployment.
- Track published Lambda versions and aliases.
For CloudFormation or AWS SAM projects, runtime configuration can be checked directly from the deployment templates before resources are updated.
This allows teams to detect an outdated runtime during code review rather than discovering it during deployment.
Summary
AWS Lambda runtime upgrades require more than changing a language version in a function configuration.
Developers need to distinguish between managed runtime patch updates and major language runtime migrations, understand the deprecation lifecycle, and maintain an accurate inventory of functions across accounts and Regions.
AWS Health, Trusted Advisor, runtime support documentation, and AWS CLI commands provide several ways to identify functions that need attention.
Lambda's Auto, Function update, and Manual runtime update modes control how managed runtime versions receive patches, but they do not automatically migrate applications between major language versions.
For production applications, combine runtime inventory with dependency checks, compatibility testing, published versions, aliases, and CI/CD validation.
The most important improvement is to make runtime upgrades a continuous maintenance activity rather than an emergency response to an AWS deprecation notification. When teams know which functions are affected and have a tested migration process, runtime changes become much easier to manage without unexpected production disruption.
Join the conversation! Your thoughts help the community grow.