aws-serverless-auth-reference-app icon indicating copy to clipboard operation
aws-serverless-auth-reference-app copied to clipboard

gulp deploy fails on lambda creation - repo needs to be updated for supported nodejs version

Open sreljic opened this issue 6 years ago • 3 comments

[2019-01-16T04:41:55.903Z] INFO: spacefinder/20 on 1f1dc08d454a: Creating Lambd a functions from Swagger API definition... [2019-01-16T04:41:56.299Z] ERROR: spacefinder/20 on 1f1dc08d454a: step failed { InvalidParameterValueException: The runtime parameter of nodej s4.3 is no longer supported for creating or updating AWS Lambda functions. We re commend you use the new runtime (nodejs8.10) while creating or updating function s. at Object.extractError (/home/aws-serverless-auth-reference-app/api/node modules/aws-sdk/lib/protocol/json.js:48:27) at Request.extractError (/home/aws-serverless-auth-reference-app/api/nod e_modules/aws-sdk/lib/protocol/rest_json.js:45:8) at Request.callListeners (/home/aws-serverless-auth-reference-app/api/no de_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/home/aws-serverless-auth-reference-app/api/node_module s/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/home/aws-serverless-auth-reference-app/api/node_module s/aws-sdk/lib/request.js:683:14) at Request.transition (/home/aws-serverless-auth-reference-app/api/node modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/home/aws-serverless-auth-reference-app/a pi/node_modules/aws-sdk/lib/state_machine.js:14:12) at /home/aws-serverless-auth-reference-app/api/node_modules/aws-sdk/lib/ state_machine.js:26:10 at Request. (/home/aws-serverless-auth-reference-app/api/node _modules/aws-sdk/lib/request.js:38:9) at Request. (/home/aws-serverless-auth-reference-app/api/node _modules/aws-sdk/lib/request.js:685:12) message: 'The runtime parameter of nodejs4.3 is no longer supported for cr eating or updating AWS Lambda functions. We recommend you use the new runtime (n odejs8.10) while creating or updating functions.', code: 'InvalidParameterValueException', time: 2019-01-16T04:41:56.299Z, requestId: '0d7e51cb-1949-11e9-b3cf-f11385aafd34', statusCode: 400, retryable: false, retryDelay: 99.40838729249575 } [04:41:56] 'create_lambda_functions' errored after 397 ms

sreljic avatar Jan 16 '19 04:01 sreljic

Thanks for reporting this issue. I am working on a v2 of this project including the latest frameworks and runtimes, which should be available in the next few weeks.

justonian avatar Jan 16 '19 05:01 justonian

For the nodejs new comers, like myself, here's how to overcome this issue:

  1. edit the file: aws-serverless-auth-reference-app/api/util/lambda.js
  2. replace "Runtime: 'nodejs4.3'" by "Runtime: 'nodejs6.10'" You can make this change within Docker by installing vim:

apt-get update apt-get install vim vi aws-serverless-auth-reference-app/api/util/lambda.js

A word of appreciation to Jim Tran, Justin Pirtle et al, for this project's initiative. Thanks guys!

domingueslacerda avatar Jan 26 '19 13:01 domingueslacerda

For people who are following along at home, you now have to

replace "Runtime: 'nodejs4.3'" by "Runtime: 'nodejs10.x'" (Or possibly 'nodejs8.1')

rberger avatar Aug 15 '19 18:08 rberger