0% found this document useful (0 votes)
18 views

Creating A Windows EC2 Instance and Connect

Uploaded by

nitesh.9kr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Creating A Windows EC2 Instance and Connect

Uploaded by

nitesh.9kr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Creating a Linux EC2 Instance and connecting to it

1. Create a Linux EC2 Instance


a. Logon to the AWS console on https://console.aws.amazon.com using your root account.

b. After logon in the search bar type EC2 and click on EC2 in the search results or click the
services drop down button and in compute click EC2. This will open the Amazon EC2 dashboard.

c. On the dashboard just scroll down and click the Launch instance button.

d. Step 1: On the Launch an Instance page (image given below) first enter a name for this
EC2 Instance.

Step 2: Choose an Amazon Machine Image (AMI).. For this practical we will select the
Windows AMI. Click Select button Windows AMI as shown below. Make sure below the Windows
button, the version of Windows Server shows free tier eligible option. From that menu using drop
down list you can select any Windows Server version that is free tier eligible.

As you click the Windows button following Window will be displayed , just click confirm changes
button.
Scroll Below.

Step 3: Choose an Instance type option is present. you can select the configuration for your EC2
instance. This allows you to decide the number of CPU’s, RAM, storage type and Network
Bandwidth for your EC2 instance. You need to pay based on the configuration selected.
Make sure t2.micro is selected. However itdepends on the region selected. Some regions may show
t3.micro also. It is by default. This is the only instance type available for the Free tier.

Step 4: The next option asks you to select existing key or to create a new key pair. This generates a
public key and a private key. These keys are your identities for this EC2 instance. The public will be
attached to the EC2 instance. The private key is downloaded to your machine. It is a file with
an .pem or .ppk extension. When you want to access this EC2 instance you need to provide your
private key. This key will be matched with the public key with the EC2 instance. If the key matches
you are allowed to access the EC2 instance and get the shell . There can not be any other private
key matching to your public key. This is for securing the EC2 instance access. Only username and
password based access is not secure. The username and password may be leaked.
But with this mechanism no one else can access your EC2 instance as the private key is present on
your computer only. Thus you need to protect this private key and keep it secure.

For this practical select Create a new key pair option . In the key pair name field type a name for
this key. It can be anything. But make sure you give specific name so that when you create multiple
instances you know which key is associated with which instance.
Keep key pair type as RSA. Keep the Private key file format as .pem only.

Then click Create Key Pair button. Your private key will be automatically downloaded in the
browser.

You will require this file in the Accessing your EC2 instance step later.
Scroll below to go to the Network Settings section.

Step 5: Network Settings section lets you decide to connect your EC2 instance to a private Virtual
Private Cloud. It is a separate network that you need to create. For this you need to go to VPC
dashboard. Also you need to create subnets in the VPC. This allows your different EC2 instances to
run in isolated environment. These EC2 instances connected to different VPC’s can not
communicate with each other.
Firewall ( Security Group ) allows you to configure firewall rules attached with the EC2 instance
that you are creating. The Security Group rules allow different services running on this EC2
instance to be accessed from other machines. The default rule allows you to connect this EC2
instance using putty or SSH client over the internet. This allows you to remotely manage your EC2
instance and install and configure required applications or services.

For this practical keep the default options.


Step 6: In Configure Storage section you can specify the required amount of storage for your EC2
instance. This is the size of the hard disk that will be attached to the EC2 virtual machine. This
storage uses the Amazon Elastic Block Storage (EBS) storage service. You can attach multiple
volumes to a single EC2 instance by clicking the Add New Volume button and creating a new
volume.

For this practical keep the default value as it is.


Finally Click Launch Instance button whichis present on the right hand side.

Once the Instance is created its state will be shown as below.

Click View Instances button or click on instances in (EC2 > Instances > Launch an Instance) at the
top.

The page that opens will display the EC2 instance that you created just now. Click the check box in
front of the instance. This will display the information about the EC2 instance below. The details
tab will display the public IPv4 and private IPv4 address associated with this instance. Also it
displays the public and private IPv4 DNS names of this instance.

Using public IPv4 address or the public IPv4 DNS name the instance can be accessed over
Internet.When you stop an instance and start later the public IPv4 address changes. Thus using
Public DNS name is recommended.
Now your Linux EC2 instance is created and running.

Accessing the Windows EC2 Instance Using Remote Desktop Client.


Once the instance is running, select the check box in front of the Windows EC2 instance. In the
details page below, note down the public IPv4 address of the instance.

15. On the same page click the connect button displayed above the instance.

16. In the Window that opens click RDP Client option.

17. On that page, Click Download remote desktop file button. Save the file to the directory where
you saved the key.

18. In the same window click Get password option in front of password field below.

19. A new window opens as shown below.


20. In the above window click Browse button. Now select the key that was created for this instance.
After selecting the key it will look like as shown below.

21. Now click on Decrypt Password button below. A password will be displayed. Copy that
password and store securely in a file. Click cancel to close this window.

22. Now on your laptop. Go to the directory where the connection file is downloaded in step 17.

23. Double click on this file. It will open a remote desktop client window. Click connect.
24. It will prompt for the password. Copy the password generated and copied into a file in step 21
and paste in this window. Click OK.

25. The certificate message is displayed as shown below. Click Yes.

26. Now a screen will open that displays the desktop of the Windows server 2016 EC2 instance.
Click Yes in the Networks pane.
27. Now you have successfully created a Windows EC2 instance and connected to it. Now you can
install all required software on this EC2 instance.

***** Make sure you delete(Terminate) this instance once you finish this practical.

You might also like