Lambda invoke Losant webhook

I want to publish an Alexa Skill, but due to the verification process using a custom web server it was pointed out in another post that the best approach is to have the skill invoke a lambda node, which then just invokes a Losant webhook.

I am learning to code, so I am not completely sure how to do this.
Making a Google search I found in GitHub ( https://gist.github.com/LosantGists/bf4423a9a456ad3d694667988953f21a ) some code for Lamba to invoke the webhook, but again, I’m not sure what parts of the code have to be replaced, other than the webhook path. Or if there’s another way to do it.

Thanks!

Hey @MXBS13, @yoursunny has accomplished this. You should check out his article:

https://yoursunny.com/t/2017/Alexa-UACampusRec/

Thanks @anaptfox, it looks interesting, but in his solution he has a server and implemented a PHP script to avoid using Lambda.
But… I don’t have a server ¯_(ツ)_/¯

I didn’t try, but alwaysdata offers free web space that supports PHP and can run my PHP script. When you use *.alwaysdata.net domain, the certificate isn’t Let’s Encrypt and will satisfied Amazon’s requirements. The servers are in France so latency might be high.

You can also spend a little money and buy a server located in the US.

Thanks @anaptfox and @yoursunny, I was able to setup my own server and run the PHP script.
My skill is live in the Amazon Store!