Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

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

Open
sreljic opened this issue Jan 16, 2019 · 3 comments

Comments

@sreljic
Copy link

sreljic commented Jan 16, 2019

[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

@justonian
Copy link
Contributor

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.

@domingueslacerda
Copy link

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!

@rberger
Copy link

rberger commented Aug 15, 2019

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants