How to Launch an EC2 Instance from an AMI

In the last post we went through the steps to move an instance to another AWS region (LinkHere). In this post we will go through the steps to launch that instance from the AMI that was created.

  1. Within the AWS console, navigate to EC2 then on the left hand pane click AMIs under IMAGES.

2. This will show all of your AMIs for the region you are in. Select the AMI you want to launch and then click Actions \ Launch.

3. On the Choose an Instance Type Screen, Select the instance type you want to use. For simplicity the post will stick to the free-tier t2.micro. Click Next: Configure Instance Details.

4. On the Configure Instance Details page is where you can set the number of instances you need, the VPC \ subnet associations, etc. In order to reach the instance from the internet we will set the Auto-assign Public IP to Enable. Everything else we’ll leave as default. Click Next: Add Storage.

5. On the Add Storage page you can increase the size of the root volume and/or add additional EBS volumes. We’ll leave the root volume only and click Next: Add Tags

6. On the Add Tags page you can add key/value pairs to associate with a project, billing, or department identifiers. This also helps with AWS System Manager operations to identify resources for patching etc. An AWS best practice that should always be followed. Add Appropriate tags, then click Next: Configure Security Group.

7. On the Configure Security Group page, you will configure your security group. This acts like a firewall for your instance. Here you will allow which protocols you want to receive traffic from. All other traffic will be blocked. You have two options here: 1) Create a new security group or 2) use an existing security group. This example we will create a new security group. The instance is Amazon linux and therefore uses SSH for remote access (RDP for Windows instances). The default is to let have access, but this is not a good practice as it allows anyone to access the instance. You should set this to only IPs that are authorized to connect to it. For this example we will set the source to My IP. This will only allow my IP address to connect via SSH. Click Review and Launch.

8. On the Review and Launch page, review all the settings. Once you are good Click Launch.

9. This will bring up the key pair dialog box. If you have an existing key pair you can use that or Create a new key pair. This example we will create a new key pair. After selecting Create a new key pair, give the key pair a name and download the Key pair. Its very important that you store this in a safe place as if you lose it you will not be able to log into the server. After that is complete click Launch Instances.

10. You can check the status of the instances in EC2 \ Instances. Once the Instance goes to Running and the Status Checks show 2/2 checks passed, you can start using it.

Leave a Reply

Your email address will not be published. Required fields are marked *