I want to collect some information with my sensor and analyze them on greengrass core to decide whether send an e-mail by SES to me or not. Everything is ready except my connection between shadow and lambda, which is deployed on my greengrass core. When I try to get information from shadow, I can only get error code like this:
{
"code": 404,
"message": "Shadow Not Found",
"timestamp": 1529392914
}
But actually, the shadow is updated continuously every second. Is there anything that I missed? Or can somebody give me some suggestion? Thanks all!
import greengrasssdk
def lambda_handler(event, context):
seeeduino_client = greengrasssdk.client('iot-data')
client = greengrasssdk.client('iot-data') # it's used for send data to "Iot Cloud"
response = seeeduino_client.get_thing_shadow(thingName='Seeeduino_Cloud')
client.publish(
topic='load/successed',
payload=response["payload"]
)
return