Creating an AMI instead of using EC2 user data
In this recipe, we will create an AMI with a web server and then launch an instance from that AMI. Instances from AMIs have faster boot times than instances with the same configuration defined through EC2 user data. In the Launching an EC2 instance with a web server using user data recipe from Chapter 5, we used EC2 user data to update our operating system and set up a simple web server at launch.
Getting ready
We need the following to successfully complete the recipe:
- A working AWS account and a user as described in the Technical requirements section.
- A launched EC2 instance, launched following the Launching an EC2 instance with a web server using user data recipe in Chapter 5.
How to do it...
We can create an AMI from an EC2 instance as follows:
- Go to the EC2 service in the console.
- Click on Instances, select our instance, click Actions, expand Image and templates, and then click Create image. ...