How to Launch an Amazon AWS EC2 Instance
AWS EC2 is a scalable, reliable and low-priced offering from Amazon for the user’s virtual computation or hosting needs. It is ideally suited for a scalable web application or for HPC. AWS EC2 supports multiple OS and provides different instance sizes.
The present guide demonstrates how to launch an EC2 instance with the AWS Linux OS.
1. Login to your AWS Console and select the EC2 Service. It launches the EC2 dashboard. The dashboard shows the current running instances, the available elastic IPs, volumes, snapshots and other details. Click on “Launch Instance�? to launch the EC2 instance.
2. The Launch wizard has multiple options, such as “Classic Wizard�?, “Quick Launch�? and “AWS Marketplace�?. Quick Launch contains pre-configured steps, whereby it will skip some steps and launch with the default configurations. AWS Marketplace is used to launch the instance from the AWS online store. Select “Classic Wizard�? and click on “Continue�?.
3. Select the AMI. The AWS Launch screen provides multiple options to select AMI. The user can select the AMIs provided by AWS (Standard OS)., Select “My AMIs�? to launch the instance from the user’s existing AMIs or select community AMIs to launch the instance from various providers (may or may not be authorized by AWS). AWS Marketplace is used to launch the instance from the AWS online store. Click on the “Quick Start�? tab and then select the Amazon Linux AMI.
4. Provide the instance details, such as the Instance Type, Availability Zone and Number of Instances. The availability zone depends on the current region. If the user is launching the EC2 instance in VPC, select the VPC option instead of EC2.
[Newvem continuously tracks and analyzes complete resources utilization patterns, and provides a down-to-the-hour picture of your AWS consumption and usage behavior, as well as future capacity estimates. Learn more about AWS cloud utilization. ]
5. The various instance types are shown in the figure given below. Select the T1 Micro and click on the “Continue�? button.
6. Provide the Kernel ID and RAM Disk ID. Amazon EC2 provides user selectable kernels, which enables the user to select a kernel when bundling an AMI or launching an instance. User selectable kernels are useful for keeping the instances up to date with security fixes and updates, for using the functionality provided by new distributions as well as for using the specialty applications that have a unique timing requirement. Select the default Kernel and RAM Disk ID. If the user is using the IAM Role, select the Role here. For more information read how to manage AWS IAM roles. If the user wants to enable detailed monitoring, as explained in how to enable CloudWatch detailed monitoring, select the check box for the same. Click on “Continue�? after providing the necessary data.
7. Provide the storage related information. Click on “Edit�? to modify the volume size or type.
8. Provide the Root Volume Size (cannot be less than 8 GB for Linux) and Volume Type. If you want the root volume to be deleted on instance termination, select “Delete On termination�?. Save all the changes made and Click on “Continue�?.
9. Provide the tags for the AWS instance. Tagging is very useful when the user wants to track the cost of a particular instance / service, as explained in our article about how to track costs of Amazon S3 cloud objects. Then, click on “Continue�?.
10. For the security of the instance, select the existing key-pair or create a new key-pair. Provide the name of the key pair and click on “Create & Download your key pair�? to create a new key-pair. Based on the user’s browser it will ask to save the new created key pair files. If the user fails to save the file, it can never be recovered since AWS does not store the user’s private key pair for security reasons. Click Continue once the key pair has been created.
11. Select the security group. The security group provides the virtual firewall for the user’s instance. Open only the ports for the specific IPs as per the user’s requirement. Click on “Continue�?.
12. Review all the details and click on “Launch�?.
13. AWS will launch the instance and provide the user with the ID of the instance.
14. Go to the AWS EC2 console and it will display the new instance. The instance will be first in a pending state until it boots completely. It is advisable to connect to the instance once the status checks are in “2/2 Checks�?.
Launch an EC2 instance using the AWS Cloud Command Line Tools (CLI) tools
15. Setup the AWS EC2 CLI to launch an instance with the command line option.
16. Run the command ec2-run-instances to launch an instance.
You can provide various parameters, such as the instance size (default small), security group, key pair, region, AMI ID, etc.
The syntax of the command is as follows:
ec2-run-instances --region <Region Name> -k <Key Pair Name> -g <Group Name> ami-id.
Run the command ec2-describe-instances -region <Region name> to list all the instances of that region.
[Newvem analytics tracks you AWS cloud utilization:
- Hourly Utilization Pattern Analysis
- Reserved Instances Decision Tool
- Resource Resizing Opportunities
Create your free Newvem account or Learn more about Newvem]
Keywords: Amazon web services, Amazon AWS console, EC2 Service, Amazon cloud computing, Linux Instance, AMI, EC2 Instance Image, Key pair, Security Group,
You must be logged in to post a comment.