Day -4: DevOps 
Create your EC2 resources and launch your EC2 instance

Day -4: DevOps Create your EC2 resources and launch your EC2 instance

·

3 min read

AWS EC2 Use Case

In this AWS EC2 Tutorial, let’s understand the whole EC2 instance creation process through a use case in which we’ll be creating an Ubuntu instance for a test environment.

  1. Login to AWS Management Console.

Select your preferred Region.

Select a region from the drop-down, based on your region or client region

Select EC2 Service

Click EC2 under the Compute section. This will take you to the EC2 dashboard.

Click Launch Instance.

Name and tags

Select an AMI:

because you require a Linux instance, in the row for the basic 64-bit Ubuntu AMI, click Select. Application and OS Images (Amazon Machine Image)

Choose an Instance

Select the t2.micro instance, which is free tier eligible.

Key pair (login)

You can use a key pair to securely connect to your instance. Ensure that you have access to the selected key pair before you launch the instance.

Configure Instancenetwork .Create a Security Group

Configure all the details and then click on Network

Configure Instance Details Add Storage

Tag an Instance

Type a name for your AWS EC2 instance in the value box. This name, more correctly known as a tag, will appear in the console when the instance launches. It makes it easy to keep track of running machines in a complex environment. Use a name that you can easily recognize and remember.

Review and Launch an Instance

Verify the details that you have configured to launch an instance.

Check the details of a launched instance.

Converting Your Private Key Using PuTTYgen

PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. PuTTY has a tool called PuTTYgen, which can convert keys to the required PuTTY format (.ppk). You must convert your private key into this format (.ppk) before attempting to connect to your instance using PuTTY.

  • Click Load. By default, PuTTYgen displays only files with the extension .ppk. To locate your .pem file, select the option to display files of all types.

  • Select your .pem file for the key pair that you specified when you launch your instance, and then click Open. Click OK to dismiss the confirmation dialog box.

  • Click Save private key to save the key in the format that PuTTY can use. PuTTYgen displays a warning about saving the key without a passphrase. Click Yes.

  • Specify the same name for the key that you used for the key pair (for example, my-key-pair). PuTTY automatically adds the .ppk file extension.

Connect to EC2 instance using SSH and PuTTY

  • Open PuTTY.exe

  • In the Host Name box, enter Public IP of your instance.

  • In the Category list, expand SSH.

  • Click Auth (don’t expand it).

  • In the Private Key file for authentication box, browse to the PPK file that you downloaded and double-click it.

  • Click Open.

  • Type in Ubuntu when prompted for login ID.

Congratulations! You have launched an Ubuntu Instance successfully.

I hope you enjoyed this deep dive into the AWS EC2 Tutorial. It is one of the most sought-after skill sets that recruiters look for in an AWS Solution Architect Professional.