3 ms·
No async/await yet in lambda, it’s really sad. Serverless in AWS is stuck in 2015
by diegorbaquero 9y ago
No async/await yet in lambda, it’s really sad. Serverless in AWS is stuck in 2015
- plumeria 9y agoYou can use Webpack and Babel, in the meantime.
- outworlder 9y agoNode is not the only supported runtime. I'm happily deploying stuff in Golang, so no real runtimes to worry about.
- ihsw2 9y agoTypeScript accommodates async/await in <ES2017 environments.
- joshribakoff 9y agoTypescript is a language that compiles to es5. Your comment makes it sound like typescript somehow makes an old runtime support new features. You can actually use any transpiler to produce older JavaScript, this is not unique to typescript, and you're shipping es5 code at the end of the day which has tradeoffs to consider
- ihsw2 9y agoMy comment was clear, anyone investigating the subject can confirm that polyfills are used to "make" an old runtime support new features (eg: using generators for feature-complete async/await on ES6, using a custom state-machine for feature-complete async/await on ES5/ES3).
- Can_Not 9y agoMost JS developers are already use to using webpack/Babel. On Babel's website is available some quick guides to starting a new project with many options/templates. Here is a project to enhance the lambda experience with webpack https://github.com/serverless-heaven/serverless-webpack/blob/master/README.md https://github.com/serverless-heaven/serverless-webpack/blob... In production you would probably want to minify and micro-optimize anyways, so why pick one of the standard build pipeline tools and get async/await also? Your last option is spotinst. If you use their serverless service, you get native access to node 8. They load balance across AWS EC2s, GCE, and Azure.
- chrisweekly 9y ago>"so why pick one of the standard build pipeline tools" ^ why _not_ pick ... Good question, and thanks for the link
- joshribakoff 9y agoMinifying and transpiling are different things. Minifying server side code could make sense to get you wthin the filesize limits of aws. One downside to transpiling to older versions of ecmascript is it slows your code and complicates debugging. Newer JavaScript runtimes optimize for newer JavaScript features