The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda
Before opening, please confirm:
- [X] I have searched for duplicate or closed issues and discussions.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React
Amplify APIs
Authentication, REST API, GraphQL API
Amplify Categories
auth, function, api
Environment information
System: OS: Windows 10 10.0.19043 CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor Memory: 7.12 GB / 15.93 GB Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE npm: 6.14.7 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 103.0.5060.134 Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.71) Internet Explorer: 11.0.19041.1566 npmPackages: @aws-amplify/ui-react: ^0.2.15 => 0.2.15 @devexpress/dx-grid-core: ^2.7.5 => 2.7.5 @devexpress/dx-react-core: ^2.7.5 => 2.7.5 @devexpress/dx-react-grid: ^2.7.5 => 2.7.5 @devexpress/dx-react-grid-material-ui: ^2.7.5 => 2.7.5 @material-ui/core: ^4.11.0 => 4.11.0 @material-ui/data-grid: ^4.0.0-alpha.10 => 4.0.0-alpha.10 @material-ui/icons: ^4.9.1 => 4.9.1 @material-ui/lab: ^4.0.0-alpha.56 => 4.0.0-alpha.56 @stripe/react-stripe-js: ^1.1.2 => 1.1.2 @stripe/stripe-js: ^1.9.0 => 1.9.0 @testing-library/jest-dom: ^4.2.4 => 4.2.4 @testing-library/react: ^9.5.0 => 9.5.0 @testing-library/user-event: ^7.2.1 => 7.2.1 @zeit/next-css: ^1.0.1 => 1.0.1 @zeit/next-less: ^1.0.1 => 1.0.1 @zeit/next-sass: ^1.0.1 => 1.0.1 @zeit/next-stylus: ^1.0.1 => 1.0.1 aws-amplify: ^3.4.3 => 3.4.3 aws-amplify-react: ^4.1.23 => 4.1.23 aws-sdk: ^2.771.0 => 2.771.0 base-64: ^1.0.0 => 1.0.0 bootstrap: ^4.5.2 => 4.5.2 chartist: ^0.11.4 => 0.11.4 chartist-plugin-legend: ^0.6.2 => 0.6.2 classnames: ^2.2.6 => 2.2.6 es6-promise: ^4.2.8 => 4.2.8 express: ^4.17.1 => 4.17.1 image-to-base64: ^2.1.1 => 2.1.1 imagemin-mozjpeg: ^8.0.0 => 8.0.0 imagemin-optipng: ^7.1.0 => 7.1.0 imagemin-svgo: ^7.1.0 => 7.1.0 isomorphic-fetch: ^3.0.0 => 3.0.0 (2.2.1) material-ui-dropzone: ^3.4.0 => 3.4.0 material-ui-icons: ^1.0.0-beta.36 => 1.0.0-beta.36 mdi-material-ui: ^6.20.0 => 6.20.0 moment: ^2.27.0 => 2.27.0 mui-datatables: ^3.7.1 => 3.7.1 next-compose-plugins: ^2.2.0 => 2.2.0 next-fonts: ^0.17.0 => 0.17.0 next-images: ^1.6.0 => 1.6.0 next-optimized-images: ^2.6.2 => 2.6.2 next-seo: ^2.2.1 => 2.2.1 next-videos: ^1.1.3 => 1.4.0 node-fetch: ^2.6.1 => 2.6.1 (1.7.3) node-sass: ^4.14.1 => 4.14.1 node-ses: ^3.0.2 => 3.0.2 pdfmake: ^0.1.68 => 0.1.68 react: ^16.13.1 => 16.13.1 (15.6.2, 15.7.0, 0.14.10) react-accessible-accordion: ^3.3.3 => 3.3.3 react-anchor-link-smooth-scroll: ^1.0.12 => 1.0.12 react-chartist: ^0.14.3 => 0.14.3 react-color: ^2.18.1 => 2.18.1 react-countup: ^4.3.3 => 4.3.3 react-csv: ^2.0.3 => 2.0.3 react-dom: ^16.13.1 => 16.13.1 (15.7.0) react-file-base64: ^1.0.3 => 1.0.3 react-image-lightbox: ^5.1.1 => 5.1.1 react-lazy-load-image-component: ^1.5.0 => 1.5.0 react-modal-video: ^1.2.6 => 1.2.6 react-owl-carousel: ^2.3.1 => 2.3.1 react-papaparse: ^3.11.0 => 3.11.0 react-pdf: ^5.0.0 => 5.0.0 react-player: ^2.6.1 => 2.6.1 react-popout: ^1.0.3 => 1.0.3 react-responsive-carousel: ^3.2.10 => 3.2.10 react-router-dom: ^5.2.0 => 5.2.0 react-router-hash-link: ^2.4.0 => 2.4.0 react-scripts: ^3.4.3 => 3.4.3 react-simple-animate: ^3.3.10 => 3.3.10 rss-parser: ^3.12.0 => 3.12.0 stripe: ^8.121.0 => 8.121.0 utf8: ^3.0.0 => 3.0.0 uuid: ^8.3.0 => 8.3.0 (3.4.0, 3.3.2) xml2js: ^0.4.23 => 0.4.23 (0.4.19) npmGlobalPackages: @aws-amplify/cli: 9.1.0 cordova: 8.1.2 create-react-app: 3.4.1 expo-cli: 3.13.1 ionic: 4.11.0 npm: 6.14.7 reactjs-component-generator: 1.3.6 watchman: 1.0.0
Describe the bug
When i start bulding my amplify app, i got this error during backend step :
Following resources failed Resource Name: secureasyb2b6f244PostConfirmation (AWS::Lambda::Function) Event Type: update Reason: Resource handler returned message: "The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs16.x) while creating or updating functions.
So i do the following :
- Updating in the function the template where i have : "Runtime": "nodejs10.x", to "Runtime": "nodejs12.x".
- Pushing the change to amplify with "amplify Function push"
- Work great
- Build again, same error.
- Check awscloudformation stack, i see that my template is well updated with : "Runtime": "nodejs12.x", sub stack with the function is in UPDATE_ROLLBACK_COMPLETE and the main stack is in the same state.
What i see is that i updated the runtime for this function in a greater version than 10.x but it still in 10.x for a crazy reason.
Did i miss something ?
Even in lambda console i see it in 12.x
Thanks in advance.
Expected behavior
Build succes and no error with runtime 10.x
Reproduction steps
Build an amplify project with a function who u runtime 10.x or lower
Code Snippet
No response
Log output
// Put your logs below this line
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
I am also facing the same problem
Glad t osee i'm not alone. It's getting vering anoying because i can't push to production
Hello, we are currently investigating this issue and will report back soon. Apologies for the inconvenience. In the meantime, I am transferring this issue to the CLI repo as the error is occurring during amplify push.
Just to clarify, when you say "build" do you mean you are building the amplify app locally with the command amplify build or are you referring to the build step when hosting an amplify app?
From the description of the issue, it sounds like amplify push finishes and the runtime is updated, reflected in the console even. Do you not get any issues or errors during amplify push?
I'm refering to the build step when hosting an amplify app. I use amplify push to update my lambda function associated with my backend (To change the runtime nodejs10.x to nodejs12.x)
Hey @PierreBalazuc after pushing the function update with the CLI, and then push to git does the build step continue to fail despite accurately reflecting the chosen runtime version (12.x)?
Is there a workaround or something? I was just doing the tutorial, and can't push because I get this error.
Any solution for this guys ? I am facing the same issue now
Hey @PierreBalazuc, following up on this issue. Are you still experiencing this issue.
@obrian33 could you please provide us the tutorial you are following.
could you please update your CLI and run amplify update function. Please do let us know if this updates your NodeJS version.
Sorry for the delay, was on vacation. I am not encountering the error anymore. I think I might have had something misconfigured or something, I'm not sure. I didn't record the exact steps to reproduce but I do recall following this tutorial here: https://docs.amplify.aws/start/getting-started/auth/q/integration/react/#create-authentication-service.
I ran through it right now to see if I can reproduce it but everything seemed fine. I didn't update the cli before running through the tutorial and it was still fine. I think perhaps I changed something I wasn't supposed to and that's what caused my issue, I'm not really sure.
Closing due to inactivity