Embracing the Future: The Synergy of AWS Cloud Computing and IoT

Varun Kumar Manik
8 min readNov 6, 2023

Hello, tech enthusiasts!

It’s Varun Kumar here, a proud Manager at Deloitte and an AWS APN Ambassador. I recently had the privilege of speaking to a group of bright, inquisitive B. Tech students at the C. Byregowda Institute of Technology. In a world where technology is evolving at an unprecedented pace, it was a thrilling experience to discuss the transition of technology in the cloud towards IoT (Internet of Things).

Demystifying Cloud Computing and IoT

To kick things off, let’s unravel these buzzwords that are shaping our digital future. Imagine having an enormous virtual locker online where you can store all your information and access software applications without installing them on your computer. That’s cloud computing for you — remote servers on the internet providing you with storage and applications, without the burden of local hardware limitations.

Now, onto IoT. This fascinating realm is where everyday objects get a dose of intelligence, connecting them to the internet. These ‘smart’ devices range from your wristwatch tracking your daily activities to sensors in a manufacturing plant monitoring equipment. IoT makes it possible for these devices to gather information and send it across the internet or to the cloud, where it can be used in meaningful ways.

The Role of AWS in IoT

Amazon Web Services (AWS) is a powerhouse when it comes to cloud computing, and it offers a treasure trove of services that cater to IoT applications. During the seminar, we delved into how AWS IoT Core allows devices to easily connect to the cloud, ensuring they can securely interact and exchange data. It’s the backbone for any IoT solution looking to harness the power of the cloud.

AWS doesn’t stop there. It offers a comprehensive suite of IoT services. With AWS IoT Device Management, you can manage your devices at scale. AWS IoT Analytics crunches the numbers, providing insights into the data your devices collect. And with AWS IoT Events, you can easily detect and respond to events from IoT sensors and applications.

“Sensor as a Service” and the Future

One of the more intriguing discussions was about “Sensor as a Service.” This concept is like subscribing to your favorite streaming service, but instead of movies, you get data from sensors without owning or managing them. It perfectly encapsulates the cloud-IoT synergy, highlighting how we’re moving towards a more service-oriented world where access trumps ownership.

“Sensor as a Service” (SaaS) is an evolving model within the Internet of Things (IoT) ecosystem, where instead of organizations or individuals purchasing and maintaining their own physical sensor networks, they subscribe to a service provider. This provider deploys, manages, and maintains a network of sensors, and subscribers can use the data collected by these sensors for a fee. It’s a bit like using cloud storage services like Google Drive or Dropbox, where you don’t own the servers but use the space for your data.

Let’s delve into this with a simple and relatable example.

Example: Air Quality Monitoring in Indian Cities

Air quality has been a growing concern in many Indian cities. Let’s imagine a startup company called “SwachhVayu Tech” that offers Sensor as a Service for air quality monitoring.

How SwachhVayu Tech Works:


  • SwachhVayu Tech installs IoT-enabled air quality sensors across various locations in a city like Delhi. These sensors are capable of measuring pollutants like PM2.5, PM10, CO2 levels, and so on.

Data Collection and Analysis:

  • The sensors continuously collect data on air quality. This data is sent to the cloud, where it’s analyzed. SwachhVayu uses advanced algorithms to make sense of this data, turning raw numbers into understandable air quality indices.

Subscription Access:

  • Residents, local businesses, or government bodies can subscribe to SwachhVayu’s services. Depending on their subscription level, they can get real-time updates, detailed reports, historical trends, and predictive insights about air quality in their locality or across the city.


  • A local health clinic subscribes to SwachhVayu. They receive real-time air quality updates. When the air quality index (AQI) dips, they get alerts and can advise patients with respiratory issues to take precautions, like wearing masks or using air purifiers.

Value-Added Services:

  • SwachhVayu also offers integration with smart home systems. When the AQI worsens, the smart home systems automatically shut windows and turn on air purifiers.


  • Subscribers don’t have to worry about the cost and maintenance of setting up their own sensors.
  • They can access high-quality, real-time data without upfront investment.
  • SwachhVayu can provide a city-wide picture of air quality, something an individual sensor network couldn’t achieve.

Pricing Model:

  • SwachhVayu may offer different pricing tiers. For instance, basic access with real-time data and alerts might cost less, while premium access that includes predictive analytics and integration with other IoT devices might cost more.

Why It Makes Sense for India:

  • In a country like India, where budget constraints are a reality, Sensor as a Service allows for cost-effective access to advanced technologies.
  • With urban areas facing dynamic environmental challenges, SaaS provides a flexible and scalable solution.
  • It also aligns well with smart city initiatives, aiming to use technology to improve infrastructure and quality of life.

Plz find the lecture video below:

AWS: A Playground for IoT Innovation

For our demonstration, I showcased a basic example of IoT Core in action. We simulated how a smart device, such as a light bulb, can be registered and monitored using AWS IoT services. The students witnessed firsthand how data sent from the device could be viewed and managed through AWS, illustrating the simplicity and power of IoT in the cloud.

Step-by-Step Guide to Publishing a Message in AWS IoT Core from an EC2 Linux VM

Step 1: Set Up Your AWS IoT Core Environment Before your EC2 instance can talk to IoT Core, you need to set up your environment.

  • Go to the AWS IoT console.
  • In the IoT Core section, go to ‘Manage’ and then ‘Things’.
  • Click ‘Create’ to create a new IoT thing (this represents your IoT device, which will be the EC2 instance in our case).
  • Follow the instructions to register a new thing. Let’s name it ‘MyEC2Thing’.

Step 2: Create and Attach Policies

  • Still in the AWS IoT console, navigate to ‘Secure’, and then ‘Policies’.
  • Create a new policy that allows your thing to connect, publish, subscribe, and receive messages.
  • Use the ‘iot:*’ action in the policy to give full access for this example (Note: In production, you should follow the principle of least privilege).

Step 3: Attach Certificate

  • After creating your thing and policy, you need to create and activate a security certificate.
  • Attach this certificate to ‘MyEC2Thing’ and download it along with the private key.
  • Also, download the root CA for AWS IoT.

Step 4: Launch an EC2 Instance

  • Go to the EC2 console and launch a new Linux instance.
  • Choose an Amazon Machine Image (AMI) like Amazon Linux 2.
  • Configure the instance type, security group, and key pair as per your requirements.
  • Once set up, connect to your EC2 instance using SSH.

Step 5: Install the AWS IoT Device SDK for Python on EC2

  • Update the package manager and install Python and pip (if not already installed).
  • Install the AWS IoT Device SDK for Python using pip:
pip install AWSIoTPythonSDK

Step 6: Configure the SDK on Your EC2 Instance

  • On your EC2 instance, create a new Python script that will use the SDK to publish a message.
  • Make sure to use the certificates and private key you downloaded earlier.
  • Configure the endpoint, port, and topic within the script as shown below (you can find your endpoint in the AWS IoT Core settings):
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient

myMQTTClient = AWSIoTMQTTClient("MyEC2ThingClient")
myMQTTClient.configureEndpoint("your-endpoint.iot.region.amazonaws.com", 8883)
myMQTTClient.configureCredentials("/path/root-CA.crt", "/path/private.pem.key", "/path/certificate.pem.crt")

myMQTTClient.publish("topic/iot", "Hello from MyEC2Thing!", 0)

Step 7: Run the Script

  • Execute the script on your EC2 instance:
python your-script.py

Step 8: Verify the Message in the AWS IoT Core Console

  • Go back to the AWS IoT console.
  • Under the ‘Test’ section, subscribe to the same topic you published to in your Python script.
  • If everything is configured correctly, you should see the “Hello from MyEC2Thing!” message appear in the IoT Core console.

Conclusion With these steps, you’ve just sent a message from an EC2 instance to AWS IoT Core, mimicking what a real IoT device might do. This is a basic example, but the possibilities are immense. From here, you could scale up, create rules in IoT Core to trigger other AWS services, and much more.

The beauty of AWS IoT Core is that it can handle communication from thousands of devices, allowing you to collect, store, and analyze data in ways that can transform industries and lead to innovative solutions to complex problems.

And there you have it — a simple journey from a Linux VM on EC2 straight through to the heart of IoT with AWS IoT Core. Dive in, and see what incredible things you can build when you combine the power of the cloud with the ingenuity of IoT.

Looking Ahead

As we wrapped up the seminar, it was evident that the intersection of cloud computing and IoT is not just a trend but a fundamental shift in how we interact with technology. It’s about turning data into action, bringing intelligence to the edge, and reimagining how we live and work.

For the aspiring engineers at the C. Byregowda Institute of Technology, the message was clear: the future is bright and limitless. With cloud computing and IoT in their toolkit, there’s no limit to what they can build or the problems they can solve. The key is to stay curious, keep learning, and never hesitate to explore the endless possibilities that technology presents.

To the students who attended the seminar virtually: thank you for your engaging questions and enthusiasm. To those reading this blog: I encourage you to dive into the world of AWS and IoT. Experiment, innovate, and be part of the technological revolution that is cloud computing and IoT.

A Special Note of Thanks

As I conclude this discussion on the fascinating transition of cloud technology towards IoT, I find it imperative to acknowledge a figure instrumental to my educational journey. I would like to extend my sincere thanks to Dr. Vandan Dubey, who was my teacher back in 2014 and has continued to inspire students as an Assistant Professor at Cbyregowda Institute of Technology (CBIT).

Dr. Dubey, your teachings have left an indelible mark on my professional ethos, and it is under your esteemed guidance that I’ve come to appreciate the profound impact of mentorship in shaping careers. It’s an absolute honor to contribute to the seminar “Transition of Technology in Cloud towards IoT,” a subject you’ve taught with passion and expertise, at your esteemed institute.

Your commitment to education and the nurturing of young minds is laudable, and I am grateful for the opportunity to share in this endeavor, connecting the next generation of students with the possibilities of cloud and IoT.

Thank you for laying the foundational stones upon which I continue to build my career and for inviting me to be a part of this educational experience.



Varun Kumar Manik

AWS APN Ambassador | SME of DevOps DevSecOps | Cloud Architect & Trainer | Blogger | Youtuber |Chef