AWS Lambda - Making HTTPS POST Calls easy

I found it difficult to find a way to easily trigger requests to 3rd party REST APIs while using AWS Lambda. The Particle console allows us to do this via Webhooks. However, the Particle.Publish() and Webhooks have significant usage limits that I couldn’t work around. Particle.publishes() are limited to 1 per second, or 4 in 1 second with no further publishes for the next 3 seconds (bursting).

Using a second MQTT service connected to AWS allows us to send up to 3000 messages/second (at QoS level 0). No more worrying about getting rate limited or getting knocked off the Particle cloud for publishing too frequently (or due to network transmission lag resulting in too many messages being received over the 4 second period).

I hope you find this helpful.

https://github.com/CameronTurner/Lambda-HTTPS-Posts

Use case flow as follows:
Particle Device > MQTT TLS Library > AWS IoT MQTT > AWS IoT Action > Lambda > 3rd party REST API

You can also use the AWS API Gateway rather than a SSL secure message (less overhead/space/data usage, etc).

1 Like

Thank you for your hard work!

1 Like