Amplify-cli: Allow use of nodejs10.x for various "built in" Amplify Lambda functions

Created on 22 Oct 2019  路  10Comments  路  Source: aws-amplify/amplify-cli

Is your feature request related to a problem? Please describe.
NodeJS 8 is EOL at the end of 2019, early 2020. Amazon has announced that deploying new Lambda functions using NodeJS 8.x will not be possible on or after the 6th of January 2020. Updating existing functions running on NodeJS 8, will not be possible around the 6th of February 2020.

The Auth/UserPool lambda function, and other functions like UpdateRoles*, which are "auto generated" by Amplify, are running on NodeJS 8.10 and manually changing this seems not to be possible due to the following error:

UPDATE_FAILED UserPoolClientLambda AWS::Lambda::Function Mon Oct 21 2019 04:13:13 GMT-0500 ZipFile can only be used when Runtime is set to either of nodejs, nodejs4.3, nodejs6.10, nodejs8.10, python2.7, python3.6, python3.7.

Updating some functions manually does not seem to be possible, so maybe this should happen automatically or an enforced migration should happen?

Describe the solution you'd like
Even though it's a few months away, starting this process now, should make this transition smooth for everyone, as most active projects would have migrated before Lambda will enforce and block NodeJS 8 from working.

Additional context
We recently hit a Python update on Lambda which broke DB to Elasticsearch overnight, by auto migrating to NodeJS 10.x now, history won't repeat itself.

enhancement functions platform

Most helpful comment

Per latest AWS notices:

Beginning January 6, 2020, customers will no longer be able to create functions using Node.js 8.10

Currently, cli-generated functions for e.g. adding users to groups in auth or storage triggers use node 8 runtime. Does this imply after Jan 6 amplify push will result in errors when such features are selected? Any workarounds? Or does the AWS roadmap has fixes mentioned above scheduled in December? We anticipate moving a development setup into production mid-Jan so trying to get some clarity for planning...

All 10 comments

@houmark We're aware of this and tracking it as a part of this PR - #2608 (still work in progress).
Also, we are following up with the Cloudformation team, since they have a dependency to support NodeJS 10.x for custom resources - which we user for the resource you've mentioned above, before we make the change in our codebase.

Thanks, I had missed that one. Maybe we should keep this one open, so others who come to look for an issue related to this message appearing in their Console will see this?

Edit: And do update the title of this one, if you have a better one.

Yes, I agree. Let鈥檚 keep this open.

In my AUTH cloud formation template, I changed Runtime: nodejs8.10 to Runtime: nodejs10.x and got the following error.

UPDATE_FAILED UserPoolClientLambda AWS::Lambda::Function Thu Oct 24 2019 18:08:21 GMT-0400 (EDT) nodejs10.x does not support cfn-response

Once the PR is integrated, will the upgrade path be to manually edit the cloud formation template?

Hi,

Where are the 30th of octobre and I still have this issue :
UPDATE_FAILED UserPoolClientLambda AWS::Lambda::Function Wed Oct 30 2019 09:14:35 GMT+0100 (GMT+01:00) nodejs10.x does not support cfn-response

Any idea when it's going to be resolved ?

Regards,

Per latest AWS notices:

Beginning January 6, 2020, customers will no longer be able to create functions using Node.js 8.10

Currently, cli-generated functions for e.g. adding users to groups in auth or storage triggers use node 8 runtime. Does this imply after Jan 6 amplify push will result in errors when such features are selected? Any workarounds? Or does the AWS roadmap has fixes mentioned above scheduled in December? We anticipate moving a development setup into production mid-Jan so trying to get some clarity for planning...

The deadline fast approaches. Any word? I just tried updating my Amplify Cloudformation templates and pushed but the runtime didn't change on the server.

The timing of this is already a huge issue TBH - the next two weeks are holiday weeks, and for many organizations finding time to do any significant testing and deployments of new versions over the holiday periods will be a stuggle, particularly when there's no indication of when this fix will drop.

@borrell Invocations for your Lambda function won鈥檛 stop, just creation of these Lambda backed custom resources would stop. Having said that, we鈥檙e working right now for a migration doc as well as an auto migration step for these Lambda functions. I鈥檒l keep this thread updated.

Hello, we released a new version of the Amplify CLI (v4.9+), which automatically updates your Cloudformation files to use Node 10.x runtime for your Lambda functions.
Please take a look at https://aws-amplify.github.io/docs/cli/lambda-node-version-update for documentation around this and feel free to comment on this thread or open up an issue if have issues with this migration.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ReidWeb picture ReidWeb  路  3Comments

nicksmithr picture nicksmithr  路  3Comments

jexh picture jexh  路  3Comments

jeanpaulcozzatti picture jeanpaulcozzatti  路  3Comments

gabriel-wilkes picture gabriel-wilkes  路  3Comments