I'm trying to use IoT Events custom payload with Lambda action.
When I pass a JSON list format data from input and use it in the Lambda Action with JSON payload the following error occurs:
We couldn't evaluate your expression for the action. Make sure that the variable names, input names, and paths to the data refer to the existing variables and input values. Note that the maximum allowable size of the payload is 1KB.
input json
{
"thingname": "test device",
"status": [
{
"device1": "normal"
},
{
"device2": "error"
}
]
}
custom payload for Lambda
"{\"thingname\": \"${$input.inputname.thingname}\", \"device_status\": ${$input.inputname.status}}"
Does the custom payload not support JSON data? Or am I missing something?