-
ECS Cluster
aws ecs create-cluster --cluster-name healthcare-cluster
-
RDS PostgreSQL
- Enable Multi-AZ deployment
- Set storage autoscaling
- Enable automated backups
-
ElastiCache Redis
aws elasticache create-cache-cluster \ --cache-cluster-id healthcare-redis \ --engine redis \ --cache-node-type cache.t3.micro
# Production Dockerfile
FROM python:3.11-slim
RUN pip install gunicorn==20.1.0
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker"]- Obtain Let's Encrypt certificate:
certbot certonly --standalone -d api.healthcare.com
- Nginx config:
ssl_certificate /etc/letsencrypt/live/api.healthcare.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/api.healthcare.com/privkey.pem;
- Prometheus metrics endpoint:
/metrics - CloudWatch alarms for:
- Database connection pool usage
- API error rate (>5%)
- CPU utilization (>75%)
# SECURITY.md
```markdown