Packer Ubuntu 24.04 Hardened AMI
CIS Level 1 hardened Ubuntu 24.04 AMI with CloudWatch agent, SSM agent, fail2ban, and custom MOTD. Builds in under 10 minutes.
CIS Level 1 Hardened Ubuntu 24.04 AMI
A Packer template that builds a security-hardened Ubuntu 24.04 AMI following CIS Benchmark Level 1 controls, with AWS agents pre-installed and smoke tested. Ready to use as your organization's golden base image.
What's Included
- CIS Level 1 hardening: filesystem config, kernel parameters, SSH hardening, service restrictions
- CloudWatch agent pre-installed and configured for log and metrics forwarding
- SSM agent installed and enabled for Systems Manager access without SSH
- fail2ban configured to block brute-force SSH attempts
- Custom MOTD showing instance metadata and last login info
- Builds in under 10 minutes using a t3.micro spot instance
What You Get
ubuntu-24.04-hardened.pkr.hcl— main Packer templatescripts/— hardening scripts called during provisioningfiles/— CloudWatch agent config, MOTD template, sshd_configREADME.md— build instructions and CIS control reference
Requirements
- Packer 1.9+ installed locally or in CI
- AWS credentials with EC2 and AMI permissions
- Default VPC or subnet ID in target region