How to create an AMI Image in AWS

Posted by

In my next AWS article I wanted to cover creating custom AMI Images.  Creating images in AWS can be time saving by having all of your base requirements completed and ready to go for faster deployments.  Think of them like VMware templates in vCenter for my VMware people out there.

Previous article on creating an EC2 instance:

Below you will see the output from going to the webpage to confirm the expected results.  When we deploy a new instance from the image, we should see the same results without having to script it like before.

Right click on the instance or click the actions button.  Image > create image

Takes snapshot of the root directory where files are stored

Since we want to test the results to see if we get the same output on a webpage or any output, lets deploy a new instance from the image.

Once you right click and launce image the same wizard we all love will appear.  Here is where you could customize the instance, for example put it in a different subnet.

Snapshot is your AMI

I advise putting it into the same SG as before unless this instance will be associated with a different project.

Launch

Now we can launch the instance.

Now we take the public IP of the new instance and place it into a web browser.  As expected, we got the exact same results.

Summary:
As you can see creating an image is relatively easy but also it saves a large amount of time by not having to script the full install of apache and creating the web page content.  As always, I hope y’all found this useful.

Leave a Reply