
Create an AWS Free Tier Account
In this lecture, students will learn how to create an Android application project using Android Studio.
It is assumed that students have already installed Android Studio along with the required JDK before starting this lecture.
For a smooth development experience, the minimum recommended system configuration is:
16 GB RAM
Intel i5 / i7 / i9 processor (or equivalent)
In this section, students will learn how to configure an Android Virtual Device (AVD) using the Android Emulator.
The virtual device plays a crucial role in application development and debugging, allowing developers to test apps without using a physical device.
In this lecture, students will learn how to understand and design the overall screen structure of an Android application using XML layouts.
We will explore how core layout components such as ScrollView, LinearLayout, and CardView work together to build a clean, structured, and scrollable user interface.
Students will also understand:
Why ScrollView is used for vertically scrollable screens
How CardView helps in creating modern, card-based UI designs
How layout hierarchy affects spacing, alignment, and performance
By the end of this lecture, students will be able to read, analyze, and structure Android XML layouts confidently for real-world applications.
In this lecture, students will learn how to design a professional header card using Android’s CardView.
We will break down how CardView, ImageView, and TextView layouts work together to create a clean and visually appealing header section.
In this lecture, students will understand:
How to use CardView to create a modern card-style UI
How to place and style icons using ImageView
How to align and structure text using LinearLayout and TextView
Proper spacing, padding, and layout hierarchy for header sections
By the end of this lecture, students will be able to design reusable and professional header cards for Android applications.
In this lecture, students will learn how to build a complete device card layout used in real-world Android applications.
We will focus on combining CardView, buttons, and a status row to represent a controllable IoT or smart device.
In this lecture, students will understand:
How to structure a device card using CardView and LinearLayout
How to add and style an action button for device control
How to design a status row using layout weights for proper alignment
How layout logic helps keep the UI clean, scalable, and reusable
By the end of this lecture, students will be able to design functional device cards that can be used for home automation, IoT dashboards, or smart control apps.
In this lecture, students will learn how to handle button click events in Android and dynamically update the user interface based on application state.
We will implement a real-world example where a button click:
Changes device status text from Inactive to Active
Updates the status text color dynamically
Modifies button and icon background colors
Demonstrates ON / OFF toggle logic
By the end of this lecture, students will be able to connect user actions with visual feedback, which is a critical concept in Android app development and IoT-based applications.
Learning Objectives
After completing this lecture, students will be able to:
Add a click listener to a Button using Java
Access and modify UI components using findViewById
Change text and colors dynamically at runtime
Implement basic toggle logic for device state
Understand real-world UI feedback patterns
In this lecture, we integrate AWS IoT Core with an Android application by correctly setting up the required AWS SDK dependencies. You’ll learn how to add the AWS IoT and Cognito libraries, resolve common Maven and IntelliSense dependency issues, and understand why certain SDK versions are recommended.
We’ll also clarify common confusion around Cognito vs Cognito Identity, explain why builds fail when dependencies are misconfigured, and ensure your Android project compiles successfully before moving on to MQTT connectivity.
By the end of this lecture, your Android app will be fully prepared for connecting to AWS IoT Core in the next steps.
In this lecture, we test our AWS IoT Core MQTT integration in an Android application using Cognito Identity Pool ID, AWS IoT endpoint, and region configuration.
We add a dedicated MQTT test card in the UI with Connect and Publish buttons to verify connectivity. The Android app publishes a test message to the vihaan/test topic, subscribes to the same topic, and displays connection status and received messages directly on the UI.
You’ll also see a live demo using the Android Studio Emulator, making it easy to confirm that MQTT connect, publish, and subscribe are working correctly before integrating real IoT devices.
This approach provides a simple, repeatable way to validate AWS IoT connectivity during development.
In this lecture, we demonstrate step by step how to create an AWS Cognito Identity Pool using the AWS Console.
You’ll see how to enable guest (unauthenticated) access and attach the required IAM policy to the Cognito role. This lecture focuses only on the setup and configuration process, without going into theory or architecture discussions.
The goal of this lecture is to help you understand where to click, what options to choose, and how the Cognito Identity Pool and IAM role are configured for use with an application.
Topics covered
• Creating an AWS Cognito Identity Pool
• Enabling guest access
• Attaching IAM policy to the Cognito role
This lecture serves as a foundation for upcoming demos and integrations in the course.
Course Overview
This course helps beginners learn how to connect microcontrollers like ESP32 to AWS IoT Core, exchange data using MQTT, and build real-world smart IoT applications.
You will start from absolute basics—no prior AWS, cloud, or embedded experience is required. Step by step, you will build a complete IoT system covering hardware, cloud, and mobile application integration.
By the end of this course, you will be able to:
Securely connect ESP32 devices to AWS IoT Core
Publish and subscribe to MQTT topics
Control real hardware from AWS IoT Core and an Android app
Target Audience
Beginners in IoT or AWS
Engineering students
Software developers exploring cloud and hardware integration
Makers and electronics hobbyists
Android developers interested in IoT applications
Course Structure
SECTION 1: Introduction to IoT and AWS IoT Core
What is IoT? Real-world use cases
Introduction to AWS IoT Core
Why AWS for IoT projects
Course overview and required tools
SECTION 2: Setting Up the Environment
Create an AWS Free Tier account safely
Install Arduino IDE for ESP32
Install drivers and ESP32 board packages
Test ESP32 with a basic Blink sketch
SECTION 3: AWS IoT Core Basics
Understanding AWS IoT Core architecture (Thing, Certificate, Policy)
Registering a new Thing
Creating and attaching certificates and policies
Understanding IoT endpoints
SECTION 4: Connect ESP32 to AWS IoT Core
Install PubSubClient and WiFiClientSecure libraries
Connect ESP32 to Wi-Fi and AWS IoT Core
Publish MQTT messages from ESP32 to AWS
SECTION 5: Bi-Directional Communication
Subscribe ESP32 to AWS topics
Send commands from AWS IoT Core to ESP32 (LED ON/OFF)
Use AWS IoT MQTT Test Client
SECTION 6: Real-World Project #1 – Smart Home Switch
Project overview and demo
Hardware wiring and code explanation
Deploy and test the project
SECTION 7: Android App for Smart Home Control
Build an Android app using AWS IoT Core SDK
Control an ESP32-based smart switch from a mobile app
Complete an end-to-end IoT ecosystem
Section Outcome
Students will build an Android application that communicates with AWS IoT Core to control a real ESP32-based smart home switch (Light ON/OFF).
This completes a full end-to-end IoT solution:
ESP32 Hardware → AWS IoT Core → Android Mobile App
Section 8: Production-Grade Authentication & Authorization Architecture
This section moves beyond basic IoT connectivity and dives into real-world security architecture using Amazon Cognito.
You’ll gain a deep understanding of:
How User Pools authenticate users and issue JWT tokens
How Identity Pools exchange those tokens for temporary AWS credentials
How IAM roles enforce least-privilege access
How mobile and web apps securely access AWS services
How Cognito integrates with AWS IoT Core in production
We also clarify the critical difference between user authentication and device authentication, ensuring you understand when to use Cognito versus X.509 certificates in IoT architectures.
This section equips you with the architectural knowledge required to design secure, scalable, and production-ready IoT systems — not just demo projects.
Section 9: MQTT Protocol Explained (From Basics to AWS IoT Core)
Learn the MQTT protocol in depth, the backbone of modern IoT communication.
This section explains how publish/subscribe works, how topics are structured, how QoS affects reliability, and how AWS IoT Core securely manages MQTT traffic at scale. You’ll gain a clear mental model of how messages flow between devices, cloud, and applications.
Section 10: Security & Scalability Best Practices for IoT Applications
Move beyond demos and learn industry best practices for building secure and scalable IoT solutions.
This section covers secure access patterns, least-privilege IAM usage, scalable topic design, device lifecycle management, and cost-aware architecture decisions—helping you build applications that are ready for real production environments.