This lab is currently in Beta, content may be updated as we refine the material
LABBEGINNER

First AWS AMI

Bake your first Ubuntu 24.04 AMI with Packer amazon-ebs, prove it exists in AWS, validate Azure and GCP sidecar templates, then deregister the AMI and delete its snapshot.

45 minutes
hashicorp/packer
First AWS AMI - Platform Engineering Hands-On Lab Icon
Share this Lab

Lab Overview

This is the hands-on lab for Section 6 of Packer 101. You write an amazon-ebs template that selects Ubuntu 24.04 LTS (Noble) from Canonical, launches a t2.micro builder in us-east-1, provisions a marker file with a shell provisioner, and registers a uniquely named AMI. You intentionally break the template, read the validate error, and fix it. After the bake you prove the AMI with the AWS CLI, then fmt and validate dummy Azure and GCP sidecar templates without building them. Cleanup deregisters the AMI and deletes its EBS snapshot so leftover images do not leak cost.

You will:

  • Confirm Packer 1.16.0 and AWS credentials on the lab host
  • Write aws-ubuntu.pkr.hcl with required_plugins amazon ~> 1.8 and a Noble

gp3 source_ami_filter

  • Run packer init, fmt, and validate, then recover from a deliberate filter

and communicator mistake

  • Build the AMI, prove it with aws ec2 describe-images, and validate Azure

and GCP sidecar templates

  • Deregister the AMI and delete its snapshot

What You'll Learn

Confirm Packer 1.16.0 and AWS identity on the packer-host lab VM

Author an amazon-ebs HCL2 template with a Noble gp3 source_ami_filter

Run packer init, fmt, and validate, and recover from a validate failure

Build an AMI, prove it with aws ec2 describe-images, and validate Azure/GCP sidecars

Deregister the AMI and delete its EBS snapshot

Prerequisites

Completion of the Packer 101 Section 6 lessons on amazon-ebs

Basic Linux command line (bash, reading logs)

Basic AWS vocabulary (region, AMI, EC2)

Technologies Covered

packeramazon-ebsamiawsubuntugolden-imageshcl2

Part of a Course

This lab is part of the Packer 101: Golden Images for AWS, Azure, and GCP course

View All Courses

Choose your plan

Simple, Transparent Pricing

Unlock full access to TeKanAid courses, labs, and bootcamps

Buying for a team? Private corporate training is available for up to 15 learners.View team training
MonthlyQuarterly
Try Premium free for 7 days →

Just exploring? Start free below. Want the full experience? Try Premium free for 7 days (card required, $0 today).

Pro

All courses, with lab scripts to run on your own machine

$59/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Full access to all courses
  • Lab scripts to download and run on your own machine (hosted labs not included)
  • Progress tracking
  • Certificate of completion
  • Community access
  • Self-paced bootcamps
  • Premium puzzle library not included (5 free puzzles available)
  • New content access
Recommended

Premium

Full access, including unlimited hosted labs

$99/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Everything in Pro
  • Unlimited hands-on labs, fully hosted on TeKanAid Academy (nothing to set up)
  • Full access to the puzzle library
  • Lab AI Assistant
  • Priority support

Prefer a single course?

Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.

Browse Courses

Just exploring? Start free, no account needed

Three free ways to start. All bridge into the paid Premium catalog when you're ready.

Not ready to commit? The crash course is email-only. No academy account required.

Ready to Get Started?

Start this hands-on lab and build real-world Platform Engineering skills

Get Access Now