Tel: (+44) 1482 234021 | info@wearesauce.io

AWS IoT: How we solved dynamic user authorisation for multiple devices

We’ve been investigating AWS IoT as a platform for our upcoming IoT projects. A typical use case for us would be providing the backend for a consumer device, with the requirement that a user can own multiple devices, and they can choose to share access to these devices with other users. The example projects for AWS IoT are very impressive, but miss out most of the detail that would be essential for us to achieve what we need. So here’s how we worked our way to a solution using Cognito User Pools.

A year at Sauce....

My name’s Tomasz Kopec and as of writing this post, I’m a Junior Software Developer for Sauce.

A year ago today I joined Sauce as a graduate Software Developer. Without any in-office work experience, I didn’t know what to expect. I had a mental image of getting into a stereotypical office, with a suit-and-tie dress code, sitting up straight at my desk in my cubicle, executing code-monkey tasks, from 9 to 5, every single day. I wasn’t looking forward to leaving student life behind and getting into that monotonous lifestyle. Sauce has proven that my preconceptions did not apply to them, exceeding my expectations every step of the way. During the next short 80 thousand words essay I will go into detail on how they did it, so buckle up.

Ecto Preloading

One feature I really like about Ecto is that it *doesn't* have lazy loading.

I remember when I first came across lazy loading, I thought it was great, but it's so easy to end up with N+1 issues etc that it was refreshing when I realised Ecto didn't support it. It basically meant that from now I had to actually plan my queries out.