Why is my Lambda runtime version different from my Lambda runtime identifier?

2 minuti di lettura
0

I want to know more about AWS Lambda runtime versions and how they differ from Lambda runtimes. Additionally, I want to know how I identify these values and how they affect my Lambda functions.

Short description

A Lambda function runs with a specific runtime, such as Python 3.12 or Node.js 14.x. These runtimes are updated by their owners as necessary. Lambda makes sure that each managed runtime is updated with all current security updates, bug fixes, new features, performance enhancements, and support for minor version releases. These runtime updates are then published as runtime versions. Lambda also applies these runtime updates to Lambda functions that use an earlier runtime version so that they use the new runtime version.

Resolution

Lambda runtime identifiers vs. Lambda runtime versions

Lambda runtime identifiers are different than Lambda runtime versions. The runtime identifier represents a distinct major release of the programming language, such as nodejs18.x, nodejs20.x, python3.11, or python3.12. The runtime version refers to minor runtime and security patches for your function's launch environment. The runtime version describes the patch version of an individual runtime. For more information, see Introducing AWS Lambda runtime management controls.

Lambda runtime minor versions

Lambda runtime minor versions are different than Lambda runtime versions. To find the Runtime version ARN, complete the following steps:

  1. Open AWS Lambda console.
  2. Select your function's name.
  3. In the Runtime settings section, choose Runtime management configuration.
    -or-
    Find the Runtime version ARN in your function logs.

The following log appears every time that Lambda creates a new launch environment for your function.

INIT_START Runtime Version: python:3.9.v14    Runtime Version ARN: arn:aws:lambda:eu-south-1::runtime:7b620fc2e66107a1046b140b9d320295811af3ad5d4c6a011fad1fa65127e9e6I

To find the runtime minor version for Node.js-based Lambda functions, log the version with process.version as the following example shows:

console.log('NODE_VERSION', process.version)

To find the runtime minor version for Python-based Lambda functions, log the version with sys.version as the following example shows.

import sys
print (sys.version)

Example output for Python:

3.12: 3.12.5 (main, Sep 9 2024, 14:55:57) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)]

Related information

How do I troubleshoot Lambda function failures caused by runtime version errors?

Runtime update modes

AWS UFFICIALE
AWS UFFICIALEAggiornata 2 mesi fa