Production-grade serverless price monitoring system that automatically tracks e-commerce product prices, provides sends smart alerts. Built with AWS cloud-native architecture for scalability and cost-efficiency.
- Multi-platform support: Amazon, eBay, and generic e-commerce sites
- Intelligent scraping: Rotating user agents and anti-bot measures
- Complete price history: Time-series data with automated retention
- Configurable thresholds: Customizable price change alerts (default: 5%)
- Email notifications: Instant alerts via AWS SNS
- Alert history: Complete tracking with auto-cleanup
- 24/7 automated monitoring: Scheduled daily price checks
- Interactive management: Command-line tools for easy administration
- Complete monitoring: CloudWatch logs and system health metrics
graph TB
A[CloudWatch Events<br/>9 AM UTC Daily] --> B[Lambda Function<br/>Python 3.11]
B --> C[DynamoDB<br/>3 Tables]
B --> D[SNS<br/>Email Alerts]
B --> E[Parameter Store<br/>Configuration]
B --> G[CloudWatch Logs<br/>Monitoring]
C --> C1[Products Table]
C --> C2[History Table<br/>TTL Enabled]
C --> C3[Alerts Table<br/>Auto-cleanup]
| Service | Purpose | Configuration |
|---|---|---|
| AWS Lambda | Core price tracking logic | Python 3.11, 15min timeout |
| DynamoDB | NoSQL data storage | 3 tables with TTL and indexes |
| SNS | Email notifications | Topic with confirmed subscription |
| CloudWatch Events | Scheduling | Daily trigger at 9 AM UTC |
| Parameter Store | Configuration management | Alert thresholds and settings |
| CloudFormation | Infrastructure as Code | Complete stack definition |
| IAM | Security and permissions | Least-privilege roles |
- AWS CLI configured with appropriate permissions
- Python 3.11+
- Bash shell (Linux/macOS/WSL)
git clone https://github.com/designed7000/Data_extractor.git
cd aws-serverless-price-trackercd aws-deployment
chmod +x deploy.sh
./deploy.shchmod +x manage_price_tracker.sh
./manage_price_tracker.sh
# Choose option 1: Add product# Test the system
aws lambda invoke --function-name price-tracker-function --payload '{}' response.json
cat response.jsonaws-serverless-price-tracker/
├── aws-deployment/
│ ├── cloudformation.yaml # Infrastructure definition
│ ├── lambda_function.py # Core tracking logic
│ ├── deploy.sh # Automated deployment
│ ├── requirements.txt # Python dependencies
│ ├── manage_price_tracker.sh # Management interface
│ ├── quick_commands.md # Management interface
│ └── shutdown-price-tracker.sh # Shuts down deployment
├── .gitignore # Git ignore rules
├── README.md # This file
└── pyproject.toml # Python project config
./manage_price_tracker.shMenu Options:
- Add new product to track
- List all tracked products
- View recent price history
- Test price tracking
- View system logs
- Update alert settings
# Manual price check
aws lambda invoke --function-name price-tracker-function --payload '{}' response.json
# View recent logs
aws logs describe-log-streams --log-group-name /aws/lambda/price-tracker-function
# List tracked products
aws dynamodb scan --table-name PriceTrackerProductsModify alert sensitivity via Parameter Store:
aws ssm put-parameter \
--name "/price-tracker/alert-threshold" \
--value "10" \
--type "String" \
--overwriteUpdate email subscription:
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:YOUR-ACCOUNT:price-alerts \
--protocol email \
--notification-endpoint [email protected]Modify run frequency in CloudFormation template:
ScheduleExpression: rate(6 hours) # Every 6 hours instead of daily- Execution time: ~10-15 seconds per run
- Monthly cost: $3-5 USD (within free tier)
- Accuracy: 95%+ successful price extractions
- Scalability: Handles 100+ products efficiently
- Trend Detection: Identifies price patterns over time
- Buy Recommendations: Algorithm suggests optimal purchase timing
- Volatility Analysis: Measures price stability
- Savings Tracking: Calculates potential savings from alerts
{
"product_name": "LG 27 inch Monitor",
"current_price": 268.00,
"price_change": "+67.9%",
"recommendation": "WAIT - Price increased significantly",
"trend": "INCREASING",
"volatility": "HIGH",
"historical_low": 159.99,
"potential_savings": 108.01
}- IAM roles: Least-privilege access principles
- VPC integration: Optional network isolation
- Parameter encryption: Secure configuration storage
- API authentication: Ready for API key integration
- TTL policies: Automatic data cleanup
- Backup strategies: Point-in-time recovery available
- Privacy compliance: No personal data stored
- Rate limiting: Anti-abuse protection
# Quick test deployment
./deploy.sh --env dev --region us-west-2# Full production deployment
./deploy.sh --env prod --enable-monitoring --backup-enabled# Deploy to multiple regions
./deploy.sh --regions "us-east-1,eu-west-1,ap-southeast-1"Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make changes and test thoroughly
- Commit with clear messages:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Create Pull Request
# Set up development environment with uv
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r aws-deployment/requirements.txt
uv pip install -r requirements-dev.txt # Development dependencies- Lambda (create, update, invoke)
- DynamoDB (create tables, read/write)
- SNS (create topics, publish)
- CloudWatch (create alarms, write logs)
- Parameter Store (read/write parameters)
- CloudFormation (create/update stacks)
boto3>= 1.26.0 - AWS SDKbeautifulsoup4>= 4.11.0 - HTML parsingrequests>= 2.28.0 - HTTP clientlxml>= 4.9.0 - XML/HTML parser
Price extraction fails
# Check CloudWatch logs
aws logs filter-log-events \
--log-group-name /aws/lambda/price-tracker-function \
--filter-pattern "ERROR"Email alerts not received
# Verify SNS subscription
aws sns list-subscriptions-by-topic \
--topic-arn arn:aws:sns:us-east-1:ACCOUNT:price-alertsDeployment fails
# Check CloudFormation events
aws cloudformation describe-stack-events \
--stack-name price-tracker-stackEnable detailed logging by setting environment variable:
export PRICE_TRACKER_DEBUG=true
./manage_price_tracker.sh| Service | Usage | Cost |
|---|---|---|
| Lambda | 30 executions/month @ 15s each | $0.00 (Free tier) |
| DynamoDB | <25GB storage, <25 WCU/RCU | $0.00 (Free tier) |
| SNS | <1000 email notifications | $0.00 (Free tier) |
| CloudWatch | Standard logging | $0.50 |
| Parameter Store | <10,000 parameters | $0.00 (Free tier) |
| Total | ~$0.50-$3/month |
Costs may vary based on usage patterns and AWS region.
Your Name
- GitHub: @designed7000
- LinkedIn: Alex_Chortis
- Email: [email protected]
© 2025 Your Name.
Released under the MIT License.
Third-party components are listed in THIRD_PARTY_NOTICES.md.