Autogenerated Lambdas Node Version

Upgrading SLS version… running into the following error:

An error occurred: CustomDashresourceDashexistingDashs3LambdaFunction - Resource handler returned message: "The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: e692cce2-ba36-48d5-b953-fe488566a3a9, Extended Request ID: null)" (RequestToken: 71ea2582-6885-1a06-1bfa-e77ac97c774e, HandlerErrorCode: InvalidRequest).

Don’t see anywhere to define the node version of these lambdas… any help is appreciated.

1 Like

In your serverless.xml, you’ll want something like this:

provider:
  name: aws
  runtime: nodejs14.x

to use NodeJS 14. Looks like it’s not a sls upgrade that will have caused it, but a change on the AWS side to remove support for node 10

Agreed, the underlying issue is the removal of the runtime support.

The lambas being deployed are python ones, so the serverless.yml already has

runtime: python3.7

defined in it.

But it turns out, updating another plugin…serverless-domain-manager fixes the issue.

Hi @mattcarter, I am also facing the same problem but in my case, the plugins are different from yours.

plugins:
  - serverless-python-requirements
  - serverless-plugin-existing-s3

Did you specify a particular version like below to fix it?

plugins:
  - serverless-plugin-existing-s3@2.5.2