How to Create EC2 Instance in AWS & SSH through Windows

How to Create EC2 Instance in AWS & SSH through Windows

10 September 2023 0 By Anshul Pal

In this tutorial, we will learn how to start a virtual server (EC2 Instance) on Amazon Web Services (AWS) using the AWS Management Console. Additionally, we will explore how to establish a connection with this EC2 Instance on both Windows (using GIT) and Linux operating systems.

Amazon EC2, which stands for Amazon Elastic Compute Cloud, is a service provided by AWS that offers flexible computing capabilities. Think of it as a virtual machine hosted in the cloud. Where you have control over the operating system. You can start and control this virtual server when you want & saves you from paying for expensive hardware upfront. This flexibility lets you swiftly create and release applications. Moreover, you can effortlessly tweak EC2 Instances to handle shifts in work or sudden popularity, reducing the need for complex traffic planning.

Best Cloud Platforms for IOT

What is Amazon EC2 Instance

Amazon Elastic Compute Cloud (Amazon EC2) is a cloud service that offers a secure and adjustable computing capability. Its purpose is to simplify large-scale cloud computing for software developers.

With Amazon EC2’s user-friendly web interface, you can easily access and configure computing power without hassle. It grants you full control over your computing resources and lets you operate within Amazon’s reliable computing environment. The remarkable feature of Amazon EC2 is its ability to swiftly provision and start new server instances within minutes, enabling you to efficiently expand or shrink your computing capacity based on your needs. This approach changes the cost structure of computing because you only pay for the capacity you actively utilize.

Additionally, Amazon EC2 provides developers with the means to build applications that can handle problems and keep working even when things go wrong.

How to Create EC2 Instance in AWS

To Create a EC2 Instance in Amazon Web Services. Firstly, you have to Login to your AWS Management Console. After that Click on Services & you can see on the top of the AWS Management Console. Here you have to search for EC2.

EC2 Instance

 

Now, Select EC2 you will Navigate to EC2 Dashboard. Click on Launch Instance to Launch EC2 Instance.

Launch EC2 Instance

After that give name to your Instance. As you can see in the image below

E2C Instance-1

Choose an Amazon Machine Image (AMI),

What is a AMI – An Amazon Machine Image (AMI) is like a blueprint for making virtual computers in Amazon’s cloud service, AWS. These virtual computers are called EC2 instances.

These blueprints are like templates that have an operating system and other software already set up, so users don’t have to start from scratch. AMIs come in different categories based on things like where they’re available, what operating system they have, whether they work on 32-bit or 64-bit computers, who can use them, and if they use Amazon’s storage service.

In this tutorial we are going with Ubuntu. E2C Instance-2

Choose an Instance Type, we are going with t2.micro & choose Next: Configure Instance Details.

Now, it’s time to create a key pair. A key pair consists of a public key, employed for encrypting data, and a private key, employed for decrypting data. Click on Create new key pair.

E2C key-pair-4

Assign a name to your key pair & left all go with default settings. Just simple click on Create key pair button.

E2C key-par-5

Finally, Your instance is ready. Click on Launch instance button to launch this instance.

E2C Launch Instance-6

Your are all done. It’s time to SSH your instance through windows operating system. So go to your desktop download folder or in those folder where you download your key pair file. By Right Click open your terminal. After that type this command.

ssh -i  "Key-pair file name" ubuntu@<Your Public IP-Address>

E2C SSH Instance-7

You will see your Public IP address into EC2 Dashboard.E2C IP Instance-8

Type yes to connect to your instance.

E2C Instance-9

Finally you are connected to your Linux Instance. As you can see in the given image.

E2C Instance-10

Suggested Reads!