Project · AWS-Jenkins-Instance

AWS Ephemeral Jenkins

A self-healing, cost-efficient Jenkins CI/CD server on AWS, fully Terraform-managed. Compute is treated as disposable; Jenkins state lives on a separate EBS volume that's snapshotted on teardown and restored on the next deploy — so the whole environment can be destroyed nightly to halt billing and brought back the next morning with zero data loss.

type readmestatus activeaws · terraform · jenkins · ci-cd

Architecture & features

  • Ephemeral compute — a t3.medium EC2 instance, disposable; if it dies, a new one replaces it.
  • Persistent state — Jenkins data on an independent 20 GB EBS volume.
  • Save / restore — a Terraform local-exec provisioner snapshots the data volume before destroy; deploy restores a new encrypted volume from the latest snapshot. Retention trims to the 3 newest.
  • Dynamic bootstrapuser_data mounts the volume, fixes Linux ownership, and patches Jenkins' config for the new public IP (the "ghost IP" fix).
  • JVM tuning/dev/urandom entropy, capped heap (-Xmx512m), persistent /tmp on the data drive.

Stack

Terraform · AWS EC2 / EBS / EBS Snapshots · bash user_data · Jenkins.

Usage

terraform apply (load) · terraform destroy (save — pauses for the snapshot copy). Architecture: AWS-Jenkins-Instance/HLD.

Source

~/Terraform/AWS-Jenkins-Instance/ (terraform/).

Compiled from wiki/projects/AWS-Jenkins-Instance/README.md · git is the source of truth