Skip to content

Hardware and Software Requirements

  • ESP32-S3-N16R8
    Espressif ESP32 family microcontroller — this walkthrough targets ESP32-S3-N16R8 with PlatformIO firmware.
    board
  • USB data cable (charge-only cables are not sufficient)
  • 2.4 GHz Wi-Fi network with SSID and password available

Install these tools on your Linux host before starting the walkthrough. Use the manual steps below for Ubuntu or Red Hat family systems (RHEL, Fedora, Amazon Linux).

ToolVerifyUsed in this walkthrough
GIT
Distributed version control — used to clone the demo repository and supporting docs.
git —version

Clone the demo repository
esp32-aws-iot-demo — source repository for firmware, provisioning scripts, Terraform, and dashboard code. Commands run from its root unless stated otherwise.

AWS CLI v2aws —version

Provision, CloudWatch
Amazon CloudWatch Logs — stores IoT rule output for Phase 1 verification (`/aws/iot/esp32-demo/telemetry` and `/events`).
logs, DYNAMODB
Amazon DynamoDB — persists telemetry and event records after Lambda ingest in Phase 2.
checks

PlatformIO
PlatformIO — build, upload, and serial monitor toolchain (`pio`) for ESP32 firmware.
(pio)

pio —version

Build and flash FIRMWARE
PlatformIO-based ESP32 application in `firmware/` — connects to Wi-Fi, syncs time, and publishes MQTT telemetry and events.

TERRAFORM
HashiCorp Terraform — provisions shared infrastructure (IoT rules fan-out, Lambda, DynamoDB, API Gateway, Amplify).
terraform versionPhase 2 infrastructure
Node.js 22node —version

Dashboard local run and AMPLIFY
AWS Amplify — hosts the walkthrough dashboard frontend and connects it to the query API URL.
deploy

This repository targets Node.js 22 (see .nvmrc in the docs site repo).

Automated installs are available from jdevto/cli-tools
jdevto/cli-tools — install scripts for Git, AWS CLI, PlatformIO, Terraform, and Node.js used as an optional Red Hat install path in prerequisites.
under each Red Hat subsection below.

Terminal window
sudo apt update && sudo apt install -y git
Terminal window
sudo dnf install -y git

Or install with install_git.sh:

Terminal window
bash <(curl -s https://raw.githubusercontent.com/jdevto/cli-tools/main/scripts/install_git.sh) install
Terminal window
sudo apt update && sudo apt install -y curl unzip
curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
unzip -q awscliv2.zip
sudo ./aws/install
rm -rf aws awscliv2.zip
Terminal window
sudo dnf install -y curl unzip
curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
unzip -q awscliv2.zip
sudo ./aws/install
rm -rf aws awscliv2.zip

Or install with install_aws_cli.sh:

Terminal window
bash <(curl -s https://raw.githubusercontent.com/jdevto/cli-tools/main/scripts/install_aws_cli.sh) install
Terminal window
sudo apt update && sudo apt install -y curl gnupg software-properties-common
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(. /etc/os-release && echo "$VERSION_CODENAME") main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install -y terraform
Terminal window
sudo dnf install -y curl gnupg2
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo dnf install -y terraform

Or install with install_terraform.sh:

Terminal window
bash <(curl -s https://raw.githubusercontent.com/jdevto/cli-tools/main/scripts/install_terraform.sh) install
Terminal window
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -o get-platformio.py
python3 get-platformio.py
rm get-platformio.py
export PATH="$HOME/.platformio/penv/bin:$PATH"

If your default Python is a pre-release build, use a stable interpreter:

Terminal window
python3.12 get-platformio.py
Terminal window
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -o get-platformio.py
python3 get-platformio.py
rm get-platformio.py
export PATH="$HOME/.platformio/penv/bin:$PATH"

Or install with install_pio.sh:

Terminal window
bash <(curl -s https://raw.githubusercontent.com/jdevto/cli-tools/main/scripts/install_pio.sh) install

Add PlatformIO to your PATH in a new shell, or append to ~/.bashrc / ~/.zshrc:

Terminal window
export PATH="$HOME/.platformio/penv/bin:$PATH"
Terminal window
NODE_VERSION=22.14.0
curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" -o node.tar.xz
mkdir -p "$HOME/.local/node"
tar -xJf node.tar.xz -C "$HOME/.local/node" --strip-components=1
rm node.tar.xz
export PATH="$HOME/.local/node/bin:$PATH"

Persist PATH in ~/.bashrc or ~/.zshrc:

Terminal window
echo 'export PATH="$HOME/.local/node/bin:$PATH"' >> ~/.bashrc
Terminal window
NODE_VERSION=22.14.0
curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" -o node.tar.xz
mkdir -p "$HOME/.local/node"
tar -xJf node.tar.xz -C "$HOME/.local/node" --strip-components=1
rm node.tar.xz
export PATH="$HOME/.local/node/bin:$PATH"

Or install with install_npm.sh:

Terminal window
NODE_VERSION=22 bash <(curl -s https://raw.githubusercontent.com/jdevto/cli-tools/main/scripts/install_npm.sh) install
Terminal window
git --version
aws --version
pio --version
terraform version
node --version
npm --version

Use an IAM
AWS Identity and Access Management — controls roles and permissions for IoT Rules, Lambda, and other services.
principal with permissions to manage services used in this walkthrough:

  • AWS IoT Core
    AWS IoT Core — managed MQTT broker with X.509 device authentication for ESP32 telemetry and events.
  • IAM
    AWS Identity and Access Management — controls roles and permissions for IoT Rules, Lambda, and other services.
  • CloudFormation
  • CloudWatch Logs
    Amazon CloudWatch Logs — stores IoT rule output for Phase 1 verification (`/aws/iot/esp32-demo/telemetry` and `/events`).
  • LAMBDA
    AWS Lambda — processes IoT rule payloads and serves query API logic behind API Gateway.
  • DYNAMODB
    Amazon DynamoDB — persists telemetry and event records after Lambda ingest in Phase 2.
  • API Gateway
    Amazon API Gateway — exposes HTTP routes for latest telemetry and recent events. The browser reads data through API Gateway, not DynamoDB directly.
  • AMPLIFY
    AWS Amplify — hosts the walkthrough dashboard frontend and connects it to the query API URL.
Terminal window
export WIFI_SSID="your-ssid"
export WIFI_PASSWORD="your-password"
export THING_NAME="esp32-c"
export AWS_REGION="ap-southeast-2"

Replace placeholder values with your own configuration before provisioning and flashing.

Terminal window
sudo ./scripts/setup-linux-usb.sh

Then log out/in (or reboot), unplug/replug board, and verify access:

Terminal window
groups | grep dialout
lsusb
ls /dev/ttyACM*