Launching an EC2 instance in AWS is much simpler. It can be launched in just 10 steps. For this demo, we are going to use latest Ubuntu xenial-16.04 64 bit version.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ or from the services menu
From the EC2 console dashboard, click Launch Instance.
Choose an Amazon Machine Image(AMI). We are selecting Ubuntu Server 16.04 LTS 64-bit version.
Amazon Machine Image (AMI) is the operating system (OS) for the instance. It provides the information required to launch an instance.
Choose an instance type for the instance, that has hardware configuration. Once chosen, click Next: Configure Instance Details button.
Instance types in Amazon EC2 comprises several options that contains the combinations of CPU, memory, storage, and networking capacity suitable for the workload.
Every field is provided with the appropriate help text. We are not going to worry much on this. Just go on to click Next: Add Storage
Optionally, in case you have already configured IAM, you can choose appropriate IAM role from the drop-down. By default, you will be provided with some data statistics from CloudWatch in 5 minute periods for free. But if you are interested in 1 minute detailed statistics, you can Enable CloudWatch detailed monitoring that incurs some additional charges.
Storage details for the instance are to be filled here. We can add volumes, its size in GiB and its types. Amazon EC2 storage is available in different options EBS, Instance Store, EFS and S3. Check Delete on Termination checkbox to delete the storage once the instance is terminated. Click Next: Add Tags.
This section is for specifying metadata to each resource in the form of tags. This enables categorization of AWS resources. You can read more about tagging here. Click Next: Configure Security Group.
We will configure Security Groups for the instance. By default, SSH rule will be set that allows accesses via port 22. This will be enough if the instance is just connected through SSH access or PuTTY terminal. In case, if the instance needs to be accessed through HTTP, default port will be 80. It can be added as a rule with drop-down to select appropriate type.
Security Groups helps in setting inbound rules for the instance. It acts as a firewall in controlling traffic for the instance.
Similarly, IP can also be configure to allow IP or range to access the instance.Click Review and Launch for the final steps
You can review the instance specifications, if needed traverse back to appropriate tab to reconfigure. Otherwise, click Launch. Remember, once launched, the configurations are only read-only and can’t be modified.
A final step before launching the instance is creating and downloading key pair for the instance.
Key Pairs are public-key cryptography to encrypt and decrypt login information.
Remember, if a new key pair is generated, it will available for download only once and it can be done only in this window. Amazon doesn’t store the private key file and once lost is lost.
Remember, do not select Proceed without a key pair option. If you launch your instance without a key pair, then you can’t connect to it.
Click Launch Instances to launch!
You will be notified with the success message and will be provided with the unique
Instance will be listed in the dashboard. On selecting the instance, description will be displayed where you will find public DNS, public IP and other configuration details.