I have a Lambda function which runs currently on Python 3.9.
Now I'm trying to upgrade the runtime to python 3.11.
So I updated my aws cli and python to the newest version.
aws --version` is `aws-cli/2.13.17 Python/3.11.5 Windows/10 exe/AMD64 prompt/of
But I'm getting this error here:
Configuration error at 'provider.runtime': must be equal to one of the allowed values [dotnet6, go1.x, java17, java11, java8, java8.al2, nodejs14.x, nodejs16.x, nodejs18.x, provided, provided.al2, python3.7, python3.8, python3.9, python3.10, ruby2.7]
I'm searching for a solution but I always geet this error when trying to change dependencies or anything else.
Maybe someone can help, thanks in advance :)
I'm deploying my Lambda via Serverless, this is my serverless.yaml:
service: name
frameworkVersion: '3'
configValidationMode: error
custom:
pythonRequirements:
dockerizePip: true
stage: ${opt:stage, self:provider.stage}
profile:
dev: dev
prod: prod
deploymentBucket:
dev: bucket-dev
prod: bucket-prod
environment: ${self:custom.environments.${self:custom.stage}, self:custom.environments.dev}
environments: ${file(environment-definition.yaml)}
provider:
name: aws
runtime: python3.11
region: eu-central-1
stage: dev
profile: ${self:custom.profile.${self:custom.stage}}
deploymentMethod: direct
deploymentBucket:
name: ${self:custom.deploymentBucket.${self:custom.stage}}
functions:
lambda_handler:
handler: handler.lambda_handler
timeout: 300
environment: ${self:custom.environment.envVars}
events:
- eventBridge:
schedule: cron(0 0 ? * 4#1 *)
package:
exclude:
- node_modules/**
- __pycache__
plugins:
- serverless-python-requirements
- serverless-better-credentials