TL;DR;  Dont leave running!

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:

Yet somehow, I've been charged for hundreds of thousands of "messages". The curious thing, is they are listed under the "Shadow Message".

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:
I've contacted AWS billing, but they have "limited access" to give me any more details as to exactly how those hundreds of thousands of messages occurred.

Fortunately, the folks at Microchip are super responsive. I had an answer within hours! (Thanks, Ben!) The forum answer copied here:

The demo GUI (, polls the GetThingShadow ( ) 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:
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 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 :)

Copyright (c) gojimmypi all rights reserved. Blogger Image Move Cleaned: 5/3/2021 1:35:53 PM