This how-to will walk you through the steps needed to create a Golden Image (or Amazon Machine Image) on AWS from an Ubuntu Pro AMI.
We are going to see how to get the latest Ubuntu Pro image from AWS and what considerations are needed in the provisioning stage to create a working Ubuntu Pro image, while revisiting the regular elements needed, all inside the Packer JSON template File.
We will be using Ubuntu Pro 20.04 for this tutorial, but this method is applicable to any other version.
Note: Packer version 1.8.1 or above is needed for creating images from Ubuntu 22.04 - Jammy Jellyfish or newer.
Note: If you want to create a FIPS AMI, it is recommended to use a pre-enabled FIPS image from the marketplace to avoid unnecessary additional steps.
What you’ll learn
- How to create golden images (AMIs) using Ubuntu Pro
- How to add your own customisations in the Packer template file without breaking the Ubuntu Pro activation mechanism.
What you’ll need
- An AWS account
- Basic understanding of AWS: EC2, IAM
- Packer installed on your workstation
- Some experience using Packer