DEVOPS ENGINEERING · 2026

AWS DevOps Pipeline

Production-grade CI/CD that tests, builds and deploys a Next.js app to AWS: GitHub Actions, Packer machine images and Terraform, behind a load balancer with auto scaling and Multi-AZ PostgreSQL.

AWS DevOps Pipeline architecture diagram
Developer push → GitHub Actions → Packer AMI → Terraform → Auto Scaling EC2 behind an ALB, with Multi-AZ RDS in private subnets.

Overview

A production-grade CI/CD pipeline that automatically builds, tests and deploys a Next.js application to AWS.

Every pull request is linted, tested and validated. Every push to main bakes a new machine image with Packer, applies the infrastructure with Terraform and rolls it out through an Auto Scaling Group behind an Application Load Balancer, with a Multi-AZ PostgreSQL database and no static cloud keys.

What it does

01

CI on every pull request

Lint, tests, build check, terraform fmt and terraform validate.

02

Immutable deploys

Packer bakes Ubuntu 22.04 images with Node.js 20, Nginx and the app pre-installed.

03

Infrastructure as code

Terraform modules for VPC, ALB, Auto Scaling, RDS, KMS, CloudWatch, ACM and Route 53.

04

Rolling refresh

New instances launch from the new image and old ones retire only after health checks pass.

05

Security by default

GitHub OIDC auth, KMS encryption, Secrets Manager and least-privilege IAM.

06

Monitoring

CloudWatch logs, alarms for 5xx errors and CPU, and a live dashboard.

How it works

  1. Build image

    GitHub Actions builds the app and Packer bakes it into a new AMI.

  2. Apply infrastructure

    Terraform plans and applies VPC, load balancer, Auto Scaling, RDS and monitoring.

  3. Refresh instances

    The Auto Scaling Group rolls out the new image with at least 50% healthy capacity.

  4. Scale & watch

    CPU-based scaling between 1 and 4 instances, with CloudWatch alarms and dashboards.

Tech stack

CI/CD

GitHub ActionsHashiCorp PackerTerraformGitHub OIDC

AWS

VPCApplication Load BalancerEC2 Auto ScalingRDS PostgreSQLKMSSecrets ManagerCloudWatchACMRoute 53S3

Application

Next.js 15TypeScriptNode.js 20Nginxsystemd
NEXT PROJECT →Nouvelle SpacesPortfolio & CMS