AWS EC2 Docker CI/CD Deployment
About This Architecture
Production-grade CI/CD pipeline deploys Dockerized NestJS API and Next.js UI to AWS EC2 using CodePipeline, CodeBuild, and CodeDeploy with Bitbucket as source. Nginx handles SSL termination via Certificate Manager while routing traffic to Docker containers running on a t3.medium instance in ap-south-1, with the NestJS backend connecting to RDS PostgreSQL in a private subnet and retrieving credentials from Secrets Manager. This architecture demonstrates cost-effective containerized deployment for DevOps teams needing automated builds, secure secret management, and database isolation without Kubernetes overhead. Fork this diagram on Diagrams.so to customize VPC CIDR ranges, swap container runtimes, or add auto-scaling groups and load balancers for high-availability scenarios.
People also ask
How do I set up a CI/CD pipeline to deploy Docker containers to AWS EC2 with CodePipeline and RDS database?
Use AWS CodePipeline to trigger CodeBuild on Bitbucket commits, build Docker images and push to ECR, then deploy via CodeDeploy to an EC2 instance running Nginx for SSL termination and Docker containers connecting to RDS PostgreSQL in a private subnet with Secrets Manager for credentials.
- Domain:
- Devops Cicd
- Audience:
- DevOps engineers deploying containerized full-stack applications on AWS EC2
Generated by Diagrams.so — AI architecture diagram generator with native Draw.io output. Fork this diagram, remix it, or download as .drawio, PNG, or SVG.