Amplify-cli: CREATE_FAILED: UserPoolClientLambda unsupported nodejs runtime

Created on 16 May 2019  路  2Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
I'm trying to build a brand new test angular application and it appears that
amplify push fails when trying to create a lambda function using an EOL runtime.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new angular app
  2. Follow instructions here: https://aws-amplify.github.io/docs/js/angular
 $ amplify init
$ amplify add auth
$ amplify add storage
$ amplify add api
$ amplify push
  1. See console output
CREATE_FAILED               UserPoolClientLambda                                  AWS::Lambda::Function      Thu May 16 2019 16:37:18 GMT+0100 (British Summer Time) The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs8.10) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 7cd01a6d-77f0-11e9-b134-ad1b84093343)
....
auth migration-issue question

Most helpful comment

I beleive this auth resource was created with previous versions of the CLI, before we upgraded our default Cloudformation tempaltes to Node 8.10. Here's a quick migration guide out here - https://aws-amplify.github.io/docs/cli/lambda-node-version-update#auth

All 2 comments

Changing the runtime version in the autogenerated cloudformation template (amplify/backend/auth/cognitod839ba04 in my case) to use nodejs8.10 appears to create the stack. However, i don't know if this is a good idea as it feels like i'm editing autogenerated code?

I beleive this auth resource was created with previous versions of the CLI, before we upgraded our default Cloudformation tempaltes to Node 8.10. Here's a quick migration guide out here - https://aws-amplify.github.io/docs/cli/lambda-node-version-update#auth

Was this page helpful?
0 / 5 - 0 ratings