Comprehensive cost breakdown for the CodeRipple serverless analysis pipeline.
AWS Lambda provides generous free tier allowances:
- 1 million requests per month (forever)
- 400,000 GB-seconds of compute time per month (forever)
- Memory: 256 MB
- Typical execution: 1-2 seconds per event
- Usage estimate: 1,000-10,000 events/month
- Cost: FREE (well within free tier limits)
- Memory: 1GB (1,024 MB) - Updated from 512MB for better performance
- Ephemeral Storage: 5GB (5,120 MB) - Testing configuration for 1 week
- Typical execution: 30-120 seconds per repository
- Usage estimate: 100-1,000 repositories/month
Cost Analysis:
- Moderate usage (1,000 invocations/month, 60 seconds each):
- GB-seconds: 60,000
- Cost: FREE (within 400K GB-seconds free tier)
- Heavy usage (10,000 invocations/month, 120 seconds each):
- GB-seconds: 1,200,000
- Free: 400,000 GB-seconds
- Paid: 800,000 GB-seconds × $0.0000166667 = $13.33/month
Upgrading Receptionist from 512MB to 1GB:
- Performance benefit: 2x CPU allocation, faster git operations
- Cost impact: Doubles compute cost but faster execution likely reduces total GB-seconds
- Net effect: Minimal cost increase, significant performance gain
- First 512 MB: Included in Lambda pricing (no additional cost)
- Additional storage: $0.0000000309 per GB-second
- Additional storage: 5GB - 0.5GB = 4.5GB
- Cost per second: 4.5GB × $0.0000000309 = $0.000000139 per second
Weekly cost examples:
- Light usage (100 invocations, 30 seconds each): ~$0.0004
- Moderate usage (1,000 invocations, 60 seconds each): ~$0.008
- Heavy usage (10,000 invocations, 120 seconds each): ~$0.17
Total for 1-week testing period: $0.01-0.20 (negligible)
Post-testing optimization: Reduce to 1-2GB based on actual usage patterns to minimize ongoing costs.
- Storage class: Standard
- Usage: Event logs, static website files
- Size estimate: <1GB for event logs
- Cost: ~$0.02/month (minimal)
- Storage class: Standard (with lifecycle policies planned)
- Usage: Cloned repositories, analysis files
- Size estimate: Varies by repository count and size
- Cost factors:
- Storage: $0.023 per GB/month
- PUT requests: $0.0005 per 1,000 requests
- GET requests: $0.0004 per 1,000 requests
Estimated monthly costs:
- Light usage (10GB storage): ~$0.25/month
- Moderate usage (100GB storage): ~$2.50/month
- Heavy usage (1TB storage): ~$25/month
- Pricing: $1.00 per million events
- Usage estimate: 1,000-10,000 events/month
- Cost: FREE (well under 1 million events)
- Pricing: $3.50 per million API calls
- Usage estimate: 100-1,000 webhook calls/month
- Cost: FREE (minimal usage)
- Lambda: FREE (within free tier)
- S3: $0.25-2.50 (depending on repository storage)
- EventBridge: FREE
- API Gateway: FREE
- Total: $0.25-2.50/month
- Lambda: $13.33 (Receptionist only, others free)
- S3: $25 (1TB repository storage)
- EventBridge: FREE
- API Gateway: FREE
- Total: ~$38/month
- Monitor ephemeral storage usage - Reduce from 5GB to optimal size
- Track repository sizes - Understand actual storage needs
- Monitor Lambda execution times - Optimize memory allocation
- Implement S3 lifecycle policies - Move old repositories to cheaper storage
- Optimize Lambda memory - Right-size based on performance metrics
- Repository cleanup - Delete processed repositories after analysis
- S3 Intelligent Tiering - Automatic cost optimization
- Lambda Provisioned Concurrency - If consistent traffic develops
- Reserved Capacity - For predictable workloads
- Lambda execution duration and memory usage
- S3 storage utilization and request patterns
- EventBridge event volume
- API Gateway request counts
- Monthly spend exceeding $50
- S3 storage growth exceeding 500GB
- Lambda execution errors or timeouts
CodeRipple is designed to be extremely cost-effective:
- Development phase: Under $3/month
- Production phase: Under $40/month even with heavy usage
- Free tier benefits: Significant cost savings for moderate usage
- Serverless architecture: Pay only for actual usage, no idle costs
The serverless approach ensures costs scale with usage while maintaining excellent performance and reliability.