My desired flow is:
- ask my iot device to do something using AVS sdk
- aws lambda triggered and update the device shadow
iot device triggered based on the shadow topic: delta and do something locally. Publish the status to shadow when done doing something
aws lambda sends voice feedback to my iot device to tell users the reported status
I am stuck in point 4 since I dont know how to trigger AVS(ASK)'s speech response only after the topic is updated "within the same lambda triggered by AVS (as mentioned in point 1 and 2).
You don't want lambda to wait. I heard from a wise man onetime, A long lived Lambda = EC2 Instance
Either create an iot rule to trigger a lambda on specific topics, or, create an api endpoint to update the topic and trigger it from the client.