Automate Amazon Machine Images(AMI’s) with Packer

What is an AMI?

An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch as many instances from the AMI as you need. You can also launch instances from as many different AMIs as you need.

Let’s see what Packer is:

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. A machine image is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image format changes for each platform like: AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.”

The reason Packer is used to create our instances, instead of already existing AMI’s tools, provided by Amazon, is that we want to have the full control for our images creation, choosing how we want to install only the packages we need. Having full control on your AMI’s creation, will be more secure.

You can find out here how to create an AMI from scratch starting from an .iso you want, using your favorite OS.