How to Launch EC2 Instence in AWS and Connect?

Madhav Prajapati
5 min readJun 20, 2023

--

What is EC2 Instance?

Amazon EC2, or Elastic Compute Cloud, is a popular web service provided by Amazon Web Services (AWS). It allows users to create and manage virtual servers called instances in the cloud. EC2 provides several key features such as scalable compute capacity, elasticity, and scalability.

Users can launch and configure instances according to their needs, choosing from various instance types optimized for different use cases. EC2 also provides security and networking capabilities, allowing users to access instances and configure network settings securely. It offers various storage options including Elastic Block Store (EBS) and Amazon S3. EC2 integrates seamlessly with other AWS services, enabling users to build comprehensive solutions.

Overall, EC2 is widely used to run a wide range of workloads and provides a flexible and scalable infrastructure on a pay-as-you-go basis.

To launch an instance in Amazon EC2, you can follow these steps:

  1. Sign in to the AWS Management Console: Go to the AWS Management Console (https://console.aws.amazon.com) and sign in with your AWS account credentials.

Open the AWS Management Console and sign in with your account .

Login with your username and password.

when you logged in to your AWS account then it is the first page that you see in your browser. and also you can see your account name in the left top corner.

now in the top search ec2 service and click on the ec2 (Virtual servers in the cloud)

when you click on the ec2 service you landed on a different page.

here you can see the launch instance button click on that and launch the instance as shown in blow image.

after clicking on the Launch Instance button it asks for some basic detail about the intence.

Add Tags: Optionally, you can add tags to your instance. Tags are key-value pairs that help you organize and identify your resources. They can be useful for resource management and cost allocation purposes. Add tags based on your preferences or requirements.

Give the Instance name: give the instance name it could be anything that you want.

Choose an AMI: After giving the Name. You’ll be prompted to select an Amazon Machine Image (AMI) for your instance. AMIs are pre-configured templates that contain the necessary operating system and software for your instance. Choose an AMI based on your requirements, such as Amazon Linux, Ubuntu, Windows Server, etc.

Choose an Instance Type: Next, you need to select the instance type. An instance type determines the hardware of the host computer used for your instance. It defines the number of virtual CPUs, amount of memory, and other hardware characteristics. Choose an instance type that suits your workload needs, such as t2.micro, m5.large, etc.

Create a Key Pair: In order to connect to your instance securely, you need to create a key pair. A key pair consists of a public key that is stored on the instance and a private key that you download to your local machine.

If you have Choose an existing key pair or create a new one. Make sure to download the private key file (.pem) and keep it in a secure location, as it will be required for SSH access.

Review and Launch: Review all the configuration settings you’ve made so far. Ensure that everything is as per your requirements. If needed, you can go back and modify any settings. Once you’re satisfied, click on the “Launch” button.

Launch Instances: After creating the key pair, click on the “Launch Instances” button. This will launch the instances based on your configuration settings.

click on the instance id. when you click you landed on the ec2 page. where you can see your running instance.

Connect to Your Instance: Once the instance is launched and running, you can connect to it using various methods. The most common method is SSH (Secure Shell) for Linux instances or RDP (Remote Desktop Protocol) for Windows instances. Use the private key file (.pem) you downloaded earlier to establish a secure connection to your instance.

In my case, I use Amazon Linux AMI, and that gives you the functionality to run the instance on the web.

click on the connect .

whoo! you launch instence and you got you your prompt.

That’s it! You have successfully launched an instance in Amazon EC2. You can now start using your instance for your desired applications or workloads.

I hope this article will be useful for you and you learned something new.

thank you : )

#vimal daga #righteducation #keeplearning & #keepsharing

keep learning keep sharing (❁´◡`❁)

--

--