🌍 Available Languages | Idiomas Disponibles | 利用可能な言語 | 可用语言 | 사용 가능한 언어
A comprehensive Python toolkit for learning Amazon Web Services (AWS) AWS IoT Core basic concepts through hands-on exploration. Interactive scripts demonstrate device management, security, API operations, and MQTT communication with detailed explanations.
# 1. Clone and setup
git clone https://github.com/aws-samples/sample-aws-iot-core-learning-path-basics.git
cd sample-aws-iot-core-learning-path-basics
# 2. Setup environment
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# 3. Configure AWS credentials
export AWS_ACCESS_KEY_ID=<your-key>
export AWS_SECRET_ACCESS_KEY=<your-secret>
export AWS_DEFAULT_REGION=<your-region (e.g. us-east-1)>
# 4. Optional: Set language preference
export AWS_IOT_LANG=en # 'es' for Spanish, 'ja' for Japanese, 'zh-CN' for Chinese, 'pt-BR' for Portuguese, 'ko' for Korean
# 5. Complete learning sequence
python scripts/setup_sample_data.py # Create sample IoT resources
python scripts/iot_registry_explorer.py # Explore AWS IoT APIs
python scripts/certificate_manager.py # Learn IoT security
python scripts/mqtt_client_explorer.py # Real-time MQTT communication
python scripts/device_shadow_explorer.py # Device state synchronization
python scripts/iot_rules_explorer.py # Message routing and processing
python scripts/cleanup_sample_data.py # Clean up resources (IMPORTANT!)Primary Audience: Cloud developers, solution architects, DevOps engineers new to AWS IoT Core
Prerequisites: Basic AWS knowledge, Python fundamentals, command line usage
Learning Level: Associate level with hands-on approach
This project leverages the official AWS SDKs to provide authentic AWS IoT Core experiences:
- Purpose: Powers all AWS IoT Registry operations, certificate management, and Rules Engine interactions
- Version:
>=1.26.0 - Documentation: Boto3 Documentation
- AWS IoT Core APIs: Boto3 IoT Client
- Purpose: Enables authentic MQTT communication with AWS IoT Core using X.509 certificates
- Version:
>=1.11.0 - Documentation: AWS IoT Device SDK for Python v2
- GitHub: aws-iot-device-sdk-python-v2
Why These SDKs Matter:
- Production-Ready: Same SDKs used in real IoT applications
- Security: Built-in support for AWS IoT security best practices
- Reliability: Official AWS-maintained libraries with comprehensive error handling
- Learning Value: Experience authentic AWS IoT development patterns
- 🚀 Quick Start
- ⚙️ Installation & Setup
- 📚 Learning Scripts
- 🧹 Resource Cleanup
- 🛠️ Troubleshooting
- 📖 Advanced Documentation
- Python 3.10+
- AWS account with IoT permissions
- Terminal/command line access
- OpenSSL (for certificate features)
This project creates real AWS resources that will incur charges (~$0.17 total).
| Service | Usage | Estimated Cost (USD) |
|---|---|---|
| AWS IoT Core | ~100 messages, 20 devices | $0.10 |
| AWS IoT Device Shadow service | ~30 shadow operations | $0.04 |
| IoT Rules Engine | ~50 rule executions | $0.01 |
| Certificate Storage | 20 certificates for 1 day | $0.01 |
| Amazon CloudWatch Logs | Basic logging | $0.01 |
| Total Estimated | Complete learning session | ~$0.17 |
1. Clone Repository:
git clone https://github.com/aws-samples/sample-aws-iot-core-learning-path-basics.git
cd sample-aws-iot-core-learning-path-basics2. Install OpenSSL:
- macOS:
brew install openssl - Ubuntu/Debian:
sudo apt-get install openssl - Windows: Download from OpenSSL website
3. Virtual Environment (Recommended):
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt4. Language Configuration (Optional):
# Set language preference for all scripts
export AWS_IOT_LANG=en # English (default)
export AWS_IOT_LANG=es # Spanish
export AWS_IOT_LANG=ja # Japanese
export AWS_IOT_LANG=zh-CN # Chinese
export AWS_IOT_LANG=pt-BR # Portuguese
export AWS_IOT_LANG=ko # Korean
# Alternative: Scripts will prompt for language if not setSupported Languages:
- English (
en,english) - Default - Spanish (
es,spanish,español) - Full translation available - Japanese (
ja,japanese,日本語,jp) - Full translation available - Chinese (
zh-CN,chinese,中文,zh) - Full translation available - Portuguese (
pt-BR,portuguese,português,pt) - Full translation available - Korean (
ko,korean,한국어,kr) - Full translation available
All learning scripts support English, Spanish, Japanese, Chinese, Portuguese, and Korean interfaces. The language affects:
✅ What Gets Translated:
- Welcome messages and educational content
- Menu options and user prompts
- Learning moments and explanations
- Error messages and confirmations
- Progress indicators and status messages
❌ What Stays in Original Language:
- AWS API responses (JSON data)
- Technical parameter names and values
- HTTP methods and endpoints
- Debug information and logs
- AWS resource names and identifiers
Usage Options:
Option 1: Environment Variable (Recommended)
# Set language preference for all scripts
export AWS_IOT_LANG=en # English
export AWS_IOT_LANG=es # Spanish
export AWS_IOT_LANG=ja # Japanese
export AWS_IOT_LANG=zh-CN # Chinese
export AWS_IOT_LANG=pt-BR # Portuguese
export AWS_IOT_LANG=ko # Korean
# Run any script - language will be applied automatically
python scripts/iot_registry_explorer.pyOption 2: Interactive Selection
# Run without environment variable - script will prompt for language
python scripts/setup_sample_data.py
# Output example:
# 🌍 Language Selection / Selección de Idioma / 言語選択 / 语言选择 / Seleção de Idioma / 언어 선택
# 1. English
# 2. Español (Spanish)
# 3. 日本語 (Japanese)
# 4. 中文 (Chinese)
# 5. Português (Portuguese)
# 6. 한국어 (Korean)
# Select language (1-6): 6Supported Scripts:
- ✅
setup_sample_data.py- Sample data creation - ✅
iot_registry_explorer.py- API exploration - ✅
certificate_manager.py- Certificate management - ✅
mqtt_client_explorer.py- MQTT communication - ✅
mqtt_websocket_explorer.py- WebSocket MQTT - ✅
device_shadow_explorer.py- AWS IoT Device Shadow service operations - ✅
iot_rules_explorer.py- Rules Engine exploration - ✅
cleanup_sample_data.py- Resource cleanup
Recommended Learning Path:
File: scripts/setup_sample_data.py
Purpose: Creates realistic IoT resources for hands-on learning
Creates: 20 Things, 3 Thing Types, 4 Thing Groups
File: scripts/iot_registry_explorer.py
Purpose: Interactive tool for learning AWS IoT Registry APIs
Features: 8 core APIs with detailed explanations and real API calls
File: scripts/certificate_manager.py
Purpose: Learn AWS IoT security through certificate and policy management
Features: Certificate creation, policy attachment, external certificate registration
Files:
scripts/mqtt_client_explorer.py(Certificate-based, recommended)scripts/mqtt_websocket_explorer.py(WebSocket-based alternative)
Purpose: Experience real-time IoT communication using MQTT protocol Features: Interactive command-line interface, topic subscription, message publishing
File: scripts/device_shadow_explorer.py
Purpose: Learn device state synchronization with AWS IoT Device Shadow
Features: Interactive shadow management, state updates, delta processing
File: scripts/iot_rules_explorer.py
Purpose: Learn message routing and processing with IoT Rules Engine
Features: Rule creation, SQL filtering, automatic AWS IAM setup
File: scripts/cleanup_sample_data.py
Purpose: Clean up all learning resources to avoid charges
Features: Safe cleanup with dependency handling
python scripts/cleanup_sample_data.pyWhat gets cleaned up:
- ✅ Sample Things (Vehicle-VIN-001, Vehicle-VIN-002, etc.)
- ✅ Associated certificates and policies
- ✅ Thing Types and Thing Groups
- ✅ Local certificate files
- ✅ IoT Rules (if any created)
What's protected:
- ❌ Existing production IoT resources
- ❌ Non-sample certificates and policies
- ❌ Resources not created by learning scripts
AWS Credentials:
# Set credentials
export AWS_ACCESS_KEY_ID=<your-key>
export AWS_SECRET_ACCESS_KEY=<your-secret>
export AWS_DEFAULT_REGION=us-east-1Python Dependencies:
pip install -r requirements.txtOpenSSL Issues:
- macOS:
brew install openssl - Ubuntu:
sudo apt-get install openssl
All scripts support debug mode for detailed API logging:
python scripts/<script_name>.py --debug- Detailed Scripts Guide - In-depth script documentation
- Complete Examples - Full workflows and sample outputs
- Troubleshooting Guide - Common issues and solutions
- Guía Detallada de Scripts - Documentación en profundidad de scripts
- Ejemplos Completos - Flujos de trabajo completos y salidas de muestra
- Guía de Solución de Problemas - Problemas comunes y soluciones
- Guia Detalhado de Scripts - Documentação aprofundada dos scripts
- Exemplos Completos - Fluxos de trabalho completos e saídas de exemplo
- Guia de Solução de Problemas - Problemas comuns e soluções
- 詳細スクリプトガイド - 詳細なスクリプトドキュメント
- 完全な例 - 完全なワークフローとサンプル出力
- トラブルシューティングガイド - よくある問題と解決策
- 자세한 스크립트 가이드 - 각 학습 스크립트에 대한 심층 문서
- 완전한 예제 - 완전한 워크플로우 및 샘플 출력
- 문제 해결 가이드 - 일반적인 문제 및 해결책
- Boto3 Documentation - Complete Python SDK documentation
- Boto3 IoT Client Reference - IoT-specific API methods
- AWS IoT Device SDK for Python v2 - MQTT client documentation
- AWS IoT Device SDK GitHub - Source code and examples
- MQTT Protocol Specification - Official MQTT documentation
- X.509 Certificate Standard - Certificate format specification
This is an educational project. Contributions that improve the learning experience are welcome:
- Bug fixes for script issues
- Translation improvements for better localization
- Documentation enhancements for clarity
- Additional learning scenarios that fit the basic level
This project is licensed under the MIT-0 License - see the LICENSE file for details.
aws-iot iot-core mqtt device-shadow certificates python learning tutorial hands-on interactive