4 ms·
Writing an AWS lambda function with Go
- rakoo 10y agoIf I understand this correctly, each request will run the Javascript handler which in turns will spawn a process that happens to be written in Go. Which means we've basically come back to CGI. I thought that CGI was bad because creating a new process on each and every request was expensive. Is Lambda somehow different ?
- avitzurel 10y agoThere's a bit more to it. Native lambda functions are "always" running (if they're frequent). When the functions runs it will spawn the Golang process and send the JSON via STDIN. It has ups/downs of course but the good thing about it (for me at least) is that I can write in Go/Ruby or any other language and just wrap it with Node. This way I can use already built libraries and data access layers etc...