Kind of a shame to have to hack on the source-code and inject a new URL - would have been better to have used a parameter. Anyway - here's how to do it with OpenFaaS and Python from August 2017 :-) https://blog.alexellis.io/first-faas-python-function/
What are the main benefits of using OpenFaaS except for vendor lock in? 99% of the time, I want a kinesis stream, or S3 event to start my lambdas, which it seems I would have to wire up myself
Perhaps to be less wasteful, the HTTP request should be a HEAD instead of GET? There’s little point downloading a whole page if you are going to just throw away the contents...
actually, it's not.
We create a special page, with PHP and one with nodejs, that just replies '1', so besides status, we also get a notice if nodejs or PHP malfunctions (which does happen on some servers, 1-2 time a year).
You can still do all that with HEAD, the only difference is you don't return a message body, thus saving 1 byte plus a few in the actual header you would not need any more.
For example; you would do a head request and node.js and php would still need to be configured to handled the HEAD request but instead of its handler returning "1" it would simply return.
1. Why go? (nothing wrong with it in itself, but last I had checked (before go on lambda was released)...Python was supposed the fastest of the bunch available)
1 a. Python can be embedded into a CF template...meaning deployment is slightly nicer (maybe not recommended though?)
2. I think the ability to change the time (20 secs) based on an SSM parameter would be cool!
Pretty neat. Instead of hard coding the url, you could provide it as parameter to the main. Pretty sure it’s possible (at least using the node and c# Lambda it was).
I'm curious about how AWS handles lambdas written in Go. Go produces statically linked Linux binaries. What is it about Go that is supported? What is it about binaries written in other languages that isn't supported?