ZeroSharp/serverless-php

SLS deploy not working anymore after nodjes6 deprecation

Closed this issue · 2 comments

After the NodeJS 6 deprecation by AWS the serverless deploy no longer works.

The runtime configured to NodeJS 6.10 in serverless.yml:

[...]
provider:
  name: aws
  runtime: nodejs6.10
[...]

Causes the following error on Serverless deploy

$ serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
........
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service xxx-serverless-php.zip file to S3 (3.92 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
................
Serverless: Operation failed!
Serverless: View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=xxxxxxxxxxxxx

  Serverless Error ---------------------------------------

  An error occurred: HelloLambdaFunction - The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs12.x) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx).

Hi, @peterv1988
As you may have already guessed. You just need to upgrade FROM:
[...]

provider:
  name: aws
  runtime: nodejs6.10
[...]

TO:

[...]
provider:
  name: aws
  runtime: nodejs12.x
[...]

Now targets nodejs14.x.