'Can I send data via sockets or HTTP(S) to AWS Gateway or AWS Lambda with an edge device?

I already have an edge device sending data to a device OEM server, which is then polled by a lambda function to fetch and process data. I need to change the device to a datalogger, which supports sockets and different application layers for uploading data to a server/the web. I'd like to use the HTTP(S) capabilities to send the data to AWS, because ideally, I'd like to reuse the lambda function that I have and the datalogger would upload the data based on a time interval and/or interrupts. How can I do that? It seems that with AWS gateway/lambda, those services have to be the one to poll the device.



Solution 1:[1]

After a bunch of digging, the solution I went with was to use MQTT and HTTPS with the AWS IoT Core service.

There is a good write-up on AWS on how to get started with MQTT, but it has to be noted that the tutorials focus on utilizing devices that can run an OS like Windows or Linux and support one of the following languages: JS, Python, or C++. The datalogger I'm working with does not support neither the OSs, nor the languages listed above.

Luckily, it supports setting MQTT configuration within its setup and it allows to upload TLS credentials, which is the way I went. By creating a "thing" and a policy along with a certificate, all of which are then interconnected, and using the end-point assigned to the account in AWS IoT Core Settings, I was able to transmit messages with MQTT over 443 and with HTTPS over 8443

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nick S.