In my previous post, I wrote about my first impressions setting up AWS.
This is just a quick blog post to show my crazy AWS charges after just a few days. Actually, not so much the cost, but the number of messages:
Note that my AWS IoT monitor has recorded less than 20 connections.
Also on that page, just a bit further down - shows I've only published a few hundred messages:
And only 2 rules executed:
So ok - 2 bucks is not a big deal... but scale that for more devices and more than a few days - and the costs get out of hand really rather quickly.
I've posted a message on the AWS forum requesting help in understanding these charges. I'm wondering if simply launching the shadow monitoring page... if there's perhaps there are repeated messages from the browser to my device such as this shadow monitor:
Fortunately, the folks at Microchip are super responsive. I had an answer within hours! (Thanks, Ben!) The forum answer copied here:
The demo GUI (aws_interact_gui.py), polls the GetThingShadow (http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html) API function to show the current shadow state. However, if left running, its polling period of 500ms could incur a lot of messages.
This polling method was not intended to be an example of how an IoT system would interact with the devices, but just a quick and easy way to display the state. Typically, one would use the IoT rules engine to trigger other actions within AWS:http://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html
We're looking into changing how this script works so leaving it running doesn't create so many messages.
So the super important take-away here is to NOT leave the aws_interact_gui.py running (at least not until updated)! At 500ms intervals (2 per second), that would be 31*24*60*60*2 = 5,356,800 messages per month! Even at $5 per million messages, that's $30 a month just to leave the diagnostic app running.
Stay tuned... I'm now digging into the RTOS code which is really quite interesting :)