I have Alexa Voice Service "installed" on a Raspberry Pi such that I can make voice requests from Alexa after pressing a button. Now, I want to be able to control the GPIO pins on the Rasberry Pi so based on what I learnt from the documentation, I decided to make a custom skill for Alexa using an AWS Lambda function.
Please correct me if my train of thought thus far is incorrect.
I thought the best thing to do would be to use TCP sockets (which are supposedly supported) in the Lambda function to send messages to my Raspberry Pi which is always connected to the internet. The Raspberry Pi would decode these messages and switch the GPIO pins accordingly. First of all, is this something that is possible through AWS Lambda? How else can one send information to a AVS enabled device? Secondly, why does the code I test on AWS keep giving me the error that "Task timed out after 3.00 seconds" when it arrives at the socket creation portion of the code. I would really appreciate it if anyone could let me know if they have any idea as to what might be going on.