5 ms·
Node.js 8.10 runtime now available in AWS Lambda
- Blackstone4 9y agoThis is massive for AWS Lambda (and we've waited a long time for this). We can now use async/await without transpiling our code. Thereby making it more readable. We should hopefully see improved performance and startup times.
- niklasrde 9y agoasync/await is still slower in 8.10 than promises though, isn't it? Also, I'd be interested to find out why this is so massive? We've been waiting a long time for this, and I get that Lambda is complex with lambda@edge and all that, but how much tweaking does AWS do to the node runtime before they can deploy this? Node 8 has been out for 10 months, and it's been LTS for half a year - or did they simply wait for it to be stable enough to run, or anything specific in 8.10?
- hn_throwaway_99 9y ago> async/await is still slower in 8.10 than promises though, isn't it? No, it's not. Async/await is basically just syntactic sugar around promises.
- bastawhiz 9y agoIn a world where cold starts have a substantial impact on performance, the runtime cost of async/await is negligible. If your function takes even a second longer to execute because of await use, I'd be incredibly surprised.
- Blackstone4 9y agoMaybe massive was an exaggeration. Before node 8.10, AWS Lambda used 6.10 which was frustrating. If you used async/await so you would have to transpile your code or upload a node binary. So really it's more convenient. Not sure why it takes 10 months to move to the new runtime. On the whole I feel like the JS/TS eco-system is getting better and better. Especially since browsers and runtimes are converging towards ES6/7 :)
- kondro 9y agoHave been waiting on this for a very long time. Hopefully AWS will keep up-to-date with LTS versions more quickly in the future. :-)
- taf2 9y agoPerhaps this will make headless chromium easier https://www.npmjs.com/package/@browserless/aws-lambda-chrome https://www.npmjs.com/package/@browserless/aws-lambda-chrome
- cordite 9y agoIt was said back in a blog post for the introduction of aws batch, but when will we be able to also use lambda functions in a batch environment? (The job isn’t too complex, it just needs to run longer than 5 minutes (an hour or two))
- Vinnl 9y agoHas anyone already managed to get this working? I currently get: expected runtime to be one of [nodejs4.3 nodejs6.10 java8 python2.7 python3.6 dotnetcore1.0 dotnetcore2.0 nodejs4.3-edge go1.x], got nodejs8.10 It might be due to my using TerraForm and that needing an update, but it's also not yet listed in the docs: https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunct... Or perhaps it's not available in all regions yet?
- ReidZB 9y agoThe AWS provider for Terraform doesn't support the new runtime yet, yeah. See: https://github.com/terraform-providers/terraform-provider-aws/issues/4019 https://github.com/terraform-providers/terraform-provider-aw... (issue) https://github.com/terraform-providers/terraform-provider-aws/pull/4020 https://github.com/terraform-providers/terraform-provider-aw... (PR)
- Vinnl 9y agoAh, thanks - I didn't know where to look.
- bnjmn 9y agoThis update was a very long time coming, so I'm grateful that it finally happened. Still, it's disappointing that they couldn't change course (ever so slightly!) to accommodate the 8.11.0 security update from a week ago: https://nodejs.org/en/blog/release/v8.11.0/ https://nodejs.org/en/blog/release/v8.11.0/ Really hope they'll be keeping up-to-date with incremental Node 8 releases, now that they've (almost) caught up with the times.
- tnolet 9y agoWas waiting for this update! Running Puppeteer related projects will now be a ton easier for ad hoc project. I'm pretty deep into this with https://checklyhq.com https://checklyhq.com so not really an "ad hoc" user. Some open concerns for "real" production use are still: - cost: memory heavy (1,5Gb) lambda get costly quickly - stability: No reason to assume this is bad, but running a Chromium browser in Docker is/was pretty tricky - startuptime: Booting Chrome might be a time suck Coupling this with SQS triggers for Lambda might make spinning up VM's obsolete for my business.
- giorgioz 9y agoNew LTS versions of node have been released in September/October for the last two years and AWS Lambda has added support for them around April/May for the last two years. I wonder if they purposefully wait for x.10 update (6.10 and 8.10) or it has something to do with internal management of projects.
- BillinghamJ 9y agoLooks like this isn't available for use with Lambda@Edge/CloudFront. Very disappointing :\