Skip to content

pinning a python runtime without an ARN

0

Is it possible to request a specific minor version of a Runtime, eg Python 3.9 v101 when running a lambda, without a specific ARN?

Also, is there a source material that has the latest minor version ( eg v101) available?

asked a year ago116 views

1 Answer
0

For AWS Lambda functions, you cannot request a specific minor version (like Python 3.9 v101) without using a runtime version ARN. Lambda offers two approaches for runtime management:

  1. Auto mode (default): Lambda automatically updates your function to the latest runtime version.

  2. Manual mode: You specify a particular runtime version using its ARN.

If you need to use a specific runtime version that your function previously ran successfully with, you would need to:

  1. Find the runtime version ARN from your function's CloudWatch logs in the INIT_START log line
  2. Switch to manual runtime management configuration
  3. Enter that specific runtime version ARN

For AWS App Runner, however, you can specify Python runtime versions using simpler syntax without ARNs. You can lock to different levels:

  • Major and minor versions (e.g., 3.9) - App Runner will only update patch versions
  • Specific patch version (e.g., 3.8.5) - App Runner won't update your runtime version at all

To find the current runtime minor version of a Python Lambda function, you can add code to log the version using sys.version. This will show you the full version details, including the minor version information.
Sources
Using the Python platform - AWS App Runner
Troubleshoot Lambda function runtime version errors | AWS re:Post
Learn the differences between Lambda runtime version and runtime identifier | AWS re:Post

answered a year ago

AWS
SUPPORT ENGINEER

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.