Why AWS for Odoo?
AWS provides enterprise-grade infrastructure for Odoo — managed PostgreSQL (RDS), object storage (S3), load balancing (ALB), auto-scaling, and global presence with 30+ regions. Best for companies that need high availability, compliance certifications (SOC2, HIPAA, PCI-DSS), or already have AWS infrastructure.
AWS Cost Estimate
| Service | Spec | Monthly Cost |
|---|---|---|
| EC2 (t3.xlarge) | 4 vCPU, 16GB RAM | ~$120 |
| RDS PostgreSQL (db.t3.medium) | 2 vCPU, 4GB RAM | ~$65 |
| EBS (gp3, 100GB) | Storage for Odoo data | ~$8 |
| S3 (50GB backups) | Backup storage | ~$1 |
| ALB | Load balancer | ~$25 |
| Total | ~$220/mo |
Cost optimization: Use Reserved Instances (1-year commit) for 30-40% savings. Use t3.large ($60/mo) for smaller deployments.
Architecture
Internet → Route 53 (DNS) → ALB (HTTPS termination)
→ EC2 Instance (Odoo 19)
→ RDS PostgreSQL (managed database)
→ S3 (backups, filestore)
→ CloudWatch (monitoring)Step 1: VPC & Security Groups
# Security Group: odoo-web
# Inbound: 80 (HTTP), 443 (HTTPS) from 0.0.0.0/0
# Inbound: 22 (SSH) from your IP only
# Outbound: All traffic
# Security Group: odoo-db
# Inbound: 5432 (PostgreSQL) from odoo-web security group only
# No public accessStep 2: RDS PostgreSQL
- RDS → Create Database → PostgreSQL 16
- Template: Production
- Instance: db.t3.medium (or db.t3.micro for dev)
- Storage: 50GB gp3 with auto-scaling
- Connectivity: Same VPC, odoo-db security group
- Database name: odoo
- Master username: odoo
- Multi-AZ: Yes for production
Step 3: EC2 Instance
# Launch Instance
# AMI: Ubuntu 24.04 LTS
# Instance type: t3.xlarge (4 vCPU, 16GB)
# Storage: 50GB gp3 root volume
# Security group: odoo-web
# Key pair: your SSH key
# SSH in
ssh -i key.pem ubuntu@your-ec2-ip
# Install Odoo (same as Ubuntu guide)
# Key difference in odoo.conf:
# db_host = your-rds-endpoint.rds.amazonaws.com
# db_port = 5432
# db_sslmode = requireStep 4: ALB + SSL
- EC2 → Load Balancers → Create Application Load Balancer
- Listener: HTTPS (443) with ACM certificate
- Target group: EC2 instance on port 8069
- Health check: /web/health
- Add second target group for WebSocket on port 8072
# ACM (free SSL certificate)
# Certificate Manager → Request Certificate → your-domain.com
# Validate via DNS (add CNAME to Route 53)Step 5: S3 Backups
# Create S3 bucket
aws s3 mb s3://company-odoo-backups --region us-east-1
# IAM role for EC2 (attach to instance)
# Policy: S3 PutObject on the backup bucket
# Backup script (uses instance role, no keys needed)
pg_dump -h your-rds-endpoint -U odoo -Fc odoo > /tmp/backup.dump
aws s3 cp /tmp/backup.dump s3://company-odoo-backups/$(date +%Y%m%d).dump
# S3 Lifecycle Rule: Delete backups older than 90 daysStep 6: Route 53 DNS
# Create hosted zone for your domain
# Add A record (alias) pointing to ALB
# your-domain.com → ALB DNS nameStep 7: CloudWatch Monitoring
- EC2 metrics: CPU, memory (requires CloudWatch agent), disk
- RDS metrics: CPU, connections, storage, IOPS
- ALB metrics: request count, latency, error rate
- Alarms: CPU > 80%, RDS connections > 80%, disk > 90%
Cost Optimization Tips
- Reserved Instances: 1-year RI saves 30%, 3-year saves 55%
- Savings Plans: Commit to $/hour for flexible compute savings
- Right-sizing: Start with t3.large, upgrade when needed
- RDS: Use db.t3.micro for dev/staging ($15/mo)
- S3 Intelligent-Tiering: Auto-moves old backups to cheaper storage
DeployMonkey on AWS
DeployMonkey deploys to AWS automatically — EC2, RDS, SSL, S3 backups — all configured with best practices. No AWS expertise needed. The AI agent monitors your AWS-hosted Odoo and optimizes costs.