AWS IoT platform

What are your thoughts on their platform and how it compares to EI and if you would use it with EI?


My thoughts are it’s an excellent way to pay amazon for more services :slight_smile:

In my (obviously biased) opinion, it’s not a viable IoT platform in the way imp is; though they have done a good job on various aspects of the embedded side (eg their example code checks certificates for the cloud connection, which sounds obvious but you wouldn’t believe how often people don’t do the basic stuff), it’s still just a pile of libs that you compile into your embedded device - which is so often the way with “IoT solutions” provided by cloud companies.

This means: it’s your problem to design & architect your embedded system. It’s your problem to keep these libs up to date. It’s your problem to work out your firmware upgrade strategy (and design & build that code), your problem to keep track of security fixes and roll out countermeasures, your problem to figure out secure provisioning and how you’ll manufacture the devices themselves, and your problem to track down obscure networking issues at remote sites. These are the things which stand in the way of IoT being deployable, scalable and secure - not the availability of an MQTT library and a hosted broker.

On the cloud side, they’ve tied into Lambda (powerful, but IMO not anywhere near as real-time or wieldy as agents), invented a “device shadow” (well, you need something like that if you can’t have agents as Lambdas aren’t persistent), and come up with a rules engine to deal with real-time routing of inbound data (because Lambdas are presumably too high-latency and/or too expensive to be used for this… agents deal with that class of problem just fine though).

It’s not really possible to use the AWS IoT platform with imp (as, well, we both cover the connectivity aspect), it is very much possible to use imp with the same AWS data backend services which - especially with new ones like Kinesis firehose - are very suited to IoT data. We’ll shortly be publishing some libraries which make this incredibly straightforward :slight_smile:

Obviously, just my $0.02. I’d be very interested in what others think!

Thanks for your thoughts Hugo. I agree it’s not as a complete solution as EI. Out of interest what protocol does EI use for device <-> agent communication? It would be great for us to see stats on the data transfer especially in the ops console as well.

We use BSON over a TLS link, though this may change - we have been experimenting with some more efficient encoding schemes. Given both ends are programmable, it’s not pubsub like MQTT but obviously you can implement pubsub over out link if desired.

I was able to use the AWSRequestV4 library with the new AWS IoT service with one minor change. We need a “serviceUrl” parameter in addition to the “service” parameter fot IoT. The “service” is “iotdata” and the “serviceUrl” for IoT is something like this “A1P0GZROM1239H.iot”. Functions _deriveSigningKey and _getCredentialScope use “service” and variables _serviceUrl and _serviceHost use “serviceUrl”.

The Runtime code is something like this:
const SERVICE = “iotdata”; // also works with "iotdevicegateway"
const SERVICEURL = “A1P0GZROM1239H.iot”; // see your REST API endpoint
const REGION = “us-east-1”;
const ACCESS_KEY_ID = “YOURKEY1321313”;
const SECRET_ACCESS_KEY = “YOURSECRETSDFasdfglasgfalsdfghalsdfghla”;


local body = {
“qos”: 0, // quality of service, optional
"state" : {
“reported” : {
“color” : “BLUE”
“desired” : { // optional, can be set to null
"color" : “RED”,
“sequence” : [ “RED”, “GREEN”, “BLUE” ]

}"/things/myThing/shadow", headers, http.jsonencode(body), function(response) {
server.log(response.statuscode + ": " + response.body);
Now the question is, can the AWS IoT be used with EI in any way? According to Hugo, it’s not really possible. I like the Rules that can be attached to a thing to send the incoming data to DynamoDB and from there to Redshift, etc. for reporting. Plese comment. Thanks, Laszlo.

You can use it like this if you want - it’s just you could do the same things with agents (and eg kinesis firehose). An agent can send direct to dynamoDB and apply much more complex rules than AWS IoT can.