Introduction
In this modern age, everything around us has some type of processor that makes it smarter. Although this was probably not meant for all the devices, with the advancements in technology and the cloud at our disposal, we can start taking advantage to help our business, create a smart home or some simple project for our personal hobbies.
Going over the problem at hand, can we effectively introduce infrastructure-as-a-code to automate the manual steps with the creation of IOT thing, connecting an ESP32 microcontroller with an Ultrasonic Distance Sensor (used for measuring the distance of an object in front of it) to the cloud and then ingesting all the collected data into Amazon Timestream a fast scalable time-series database? And the answer is yes!
We will be using Terraform to create IOT Core, and then connect our device to the cloud, which in term will allow us to route messages through IOT Topic Rules and store the data into our Timestream Table.
To have a better grasp of what we must accomplish here is a diagram for our little project: