AWS EC2 Docker CI/CD Deployment

aws · network diagram.

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.

AWS EC2 Docker CI/CD Deployment

AWSintermediateCI/CDDockerCodePipelineEC2RDS
Domain: Devops CicdAudience: DevOps engineers deploying containerized full-stack applications on AWS EC2
1 views0 favoritesPublic

Created by

February 23, 2026

Updated

March 21, 2026 at 2:53 AM

Type

network

Need a custom architecture diagram?

Describe your architecture in plain English and get a production-ready Draw.io diagram in seconds. Works for AWS, Azure, GCP, Kubernetes, and more.

Generate with AI