
Aws Ami Builder
- 2.2k installs
- 781 repo stars
- Updated August 4, 2026
- hashicorp/agent-skills
aws-ami-builder is an agent skill that builds EC2 AMIs with Packer amazon-ebs including filters, provisioners, and multi-region copy.
About
The aws-ami-builder skill builds EC2 AMIs using Packer amazon-ebs builder with HCL templates, plugin requirements, and source_ami_filter patterns for Ubuntu 22.04 and Amazon Linux 2023. Basic template sets region, t3.micro instance type, Canonical owner filters, ssh_username, timestamped ami_name, and shell provisioner inline apt upgrade steps. Multi-region ami_regions copy supports us-east-1, us-east-2, and eu-west-1 distribution. Authentication follows AWS credential chain from environment variables, credentials file, or EC2 instance profile. Build commands cover packer init, validate, and build with optional var overrides. Common issues document SSH timeout security group fixes, unique AMI name requirements with timestamp suffixes, and volume size constraints via launch_block_device_mappings. Note that AMI builds incur EC2 and EBS costs for ten to thirty minute runs. Use when creating custom AMIs for EC2 with Packer amazon-ebs builder templates. The workflow follows the source SKILL.md contract with progressive reference loading, clear trigger phrases, and practical steps developers can apply directly in agent sessions.
- Packer amazon-ebs HCL templates with plugin version constraints.
- source_ami_filter patterns for Ubuntu 22.04 and Amazon Linux 2023.
- Multi-region ami_regions copy and timestamped unique ami_name.
- Shell provisioner inline apt update and upgrade example.
- AWS auth via env vars, credentials file, or instance profile.
Aws Ami Builder by the numbers
- 2,171 all-time installs (skills.sh)
- +105 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #174 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
aws-ami-builder capabilities & compatibility
- Capabilities
- amazon ebs hcl template authoring · source ami filter configuration · multi region ami distribution · shell provisioner integration · packer init validate build workflow
- Use cases
- devops · ci cd
What aws-ami-builder says it does
Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder.
Building AMIs incurs AWS costs (EC2 instances, EBS storage, data transfer).
npx skills add https://github.com/hashicorp/agent-skills --skill aws-ami-builderAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.2k |
|---|---|
| repo stars | ★ 781 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 4, 2026 |
| Repository | hashicorp/agent-skills ↗ |
How do I create a custom Ubuntu or Amazon Linux AMI with Packer amazon-ebs builder?
Build Amazon Machine Images with Packer amazon-ebs builder including source AMI filters, multi-region copy, shell provisioners, and AWS auth patterns.
Who is it for?
Developers and DevOps engineers baking custom EC2 AMIs with HashiCorp Packer.
Skip if: Skip for container-only deployments without EC2 AMI requirements.
When should I use this skill?
Use when creating custom AMIs for EC2 instances with Packer amazon-ebs builder.
What you get
Validated Packer template with source AMI filter, provisioners, and packer build ready AMI output.
- Packer HCL templates
- Built EC2 AMI artifacts
By the numbers
- Packer AMI builds typically take 10-30 minutes
- Uses HashiCorp Packer amazon-ebs builder with github.com/hashicorp/amazon plugin
Files
AWS AMI Builder
Build Amazon Machine Images (AMIs) using Packer's amazon-ebs builder.
Reference: Amazon EBS Builder
Note: Building AMIs incurs AWS costs (EC2 instances, EBS storage, data transfer). Builds typically take 10-30 minutes depending on provisioning complexity.
Basic AMI Template
packer {
required_plugins {
amazon = {
source = "github.com/hashicorp/amazon"
version = "~> 1.3"
}
}
}
variable "region" {
type = string
default = "us-west-2"
}
locals {
timestamp = regex_replace(timestamp(), "[- TZ:]", "")
}
source "amazon-ebs" "ubuntu" {
region = var.region
instance_type = "t3.micro"
source_ami_filter {
filters = {
name = "ubuntu/images/*ubuntu-jammy-22.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"] # Canonical
}
ssh_username = "ubuntu"
ami_name = "my-app-${local.timestamp}"
tags = {
Name = "my-app"
BuildDate = local.timestamp
}
}
build {
sources = ["source.amazon-ebs.ubuntu"]
provisioner "shell" {
inline = [
"sudo apt-get update",
"sudo apt-get upgrade -y",
]
}
}Common Source AMI Filters
Ubuntu 22.04 LTS
source_ami_filter {
filters = {
name = "ubuntu/images/*ubuntu-jammy-22.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"] # Canonical
}Amazon Linux 2023
source_ami_filter {
filters = {
name = "al2023-ami-*-x86_64"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["amazon"]
}Multi-Region AMI
source "amazon-ebs" "ubuntu" {
region = "us-west-2"
instance_type = "t3.micro"
source_ami_filter {
filters = {
name = "ubuntu/images/*ubuntu-jammy-22.04-amd64-server-*"
}
most_recent = true
owners = ["099720109477"]
}
ssh_username = "ubuntu"
ami_name = "my-app-${local.timestamp}"
# Copy to additional regions
ami_regions = ["us-east-1", "us-east-2", "eu-west-1"]
}Authentication
Packer uses AWS credential resolution:
1. Environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY 2. AWS credentials file: ~/.aws/credentials 3. IAM instance profile (when running on EC2)
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_REGION="us-west-2"
packer build .Build Commands
# Initialize plugins
packer init .
# Validate template
packer validate .
# Build AMI
packer build .
# Build with variables
packer build -var "region=us-east-1" .Common Issues
SSH Timeout
- Ensure security group allows SSH (port 22)
- Verify subnet has internet access
AMI Already Exists
- AMI names must be unique
- Use timestamp in name:
my-app-${local.timestamp}
Volume Size Too Small
- Check source AMI's volume size
- Set
launch_block_device_mappings.volume_sizeaccordingly
References
Related skills
Forks & variants (1)
Aws Ami Builder has 1 known copy in the catalog totaling 26 installs. They canonicalize to this original listing.
- hashicorp - 26 installs
How it compares
Pick aws-ami-builder over manual EC2 snapshots when you need versioned Packer HCL pipelines for reproducible hardened AMIs.
FAQ
Who is aws-ami-builder for?
Developers and software engineers and DevOps engineers baking custom EC2 AMIs with HashiCorp Packer.
When should I use aws-ami-builder?
When creating custom AMIs for EC2 instances with Packer amazon-ebs builder.
Is aws-ami-builder safe to install?
Review the Security Audits panel on this page before installing in production.