MQTT and new AWS IoT service

Sure, it’s pretty simple. The webhook is like this:

{
    "eventName": "my-event-name",
    "url": "https://amazon-api-gateway-url",
    "headers": {
        "x-api-key": "my-key"
    },
    "requestType": "POST",
    "json": {
        "key1": "{{val1}}",
        "key2": "{{val2}}"
    },
    "mydevices": true
}

And then the API Gateway calls a Lambda function that currently just dumps the data into DynamoDB in basically the same format it gets it. I’m not using any of the IoT stuff right now. My main goal at the moment is just to get the data into DynamoDB, and once I’ve gone as far as getting it to the API Gateway, I might as well just write directly to DynamoDB from Lambda… I’ll probably play with the IoT stuff some more soon, but this is working for the moment.

4 Likes