How to resolve ApiLambdaFunction error using serverless to deploy Angular app to AWS

Hi all,

I am trying to deploy my Angular app to AWS using the serverless package, following the steps in this tutorial.

I’ve followed the steps correctly, & ran npm run build:serverless:deploy, but rather than the app being successfully deployed I get the following error message in the console:

An error occurred: ApiLambdaFunction - The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs10.x) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: dba0ade8-1f2c-4dc7-8ddc-c2966a54a67c).

When I run node -v in my command line, I see that it’s version 10.14.1.

However, I did find the following nodejs6.10 reference in serverless.yml :

  name: aws
  runtime: nodejs6.10
  memorySize: 192
  timeout: 10
  stage: production
  region: eu-central-1

Can someone please tell me why this is occurring & how to resolve it? Thanks a lot in advance

update the runtime value within the serverless.yml file to nodejs10.x