AWS/Azure/OpenShift

How to create an EC2 Instance

Ec2 Instance

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable computing capacity in the cloud. Amazon EC2 offers many options that help you build and run virtually any application. With these possibilities, getting started with EC2 is quick and easy to do. In this article, we shall discuss how to create an EC2 Instance. Please see the Various ways to restart an AWS EC2 instance, How to sync S3 Bucket with an EC2 instance, and How to Add and Format a New Virtual Disk to an EC2 Instance.

Note: With the AWS Free Tier, you can get 750 hours/month of select EC2 instances for free.

Also, see how to Allocate, Associate, Disassociate and Release Elastic IP Address from an EC2 Instance, Why can’t I ping the Public IP Address of an EC2 instance?, and how to install SQL Server 2022 Express and SQL Server Management Studio.

Launch an EC2 Instance

Login to your AWS account and go to the AWS Services tab at the top left corner. Search for Compute and on the right pane, select EC2.

Do not forget to select your Region before clicking on the Launch instances button.

This will open the EC2 dashboard. You can click on Launch Instance as shown below. Or click on Instances.

Here you also have the button to Launch instances as you wish. Click on Launch Instances.

Enter your instance Name, and select an OS image (Amazon Machine Image (AMI)). I am fine with Windows.

In the next step, you have to choose the type of instance you require based on your business or lab needs. I will stick with the free tier.

Note: You have to identify which instance type is best for your workload. 

EC2 Network Settings

You have to decide here, in which VPC (Virtual Private Cloud) you want to launch your instance and under which subnets inside your VPC. It is better to determine and plan this before launching the instance. 

I have created an article on VPC, Subnet, NACL, Security Group: Create your own Network on AWS from Scratch [Part 2]. Here is a guide to on GitHub Pages Deployment.

I will not be adding additional volume at this point. EC2 offers both magnetic disk and SSD storage.

Click on the launch Instance

As you can see, we have successfully provisioned our EC2 instance.

Our instance has been created and currently showing the status pending. Please refresh to see if the creation is complete.

Upon refresh, you can see our instance is running. That is how to manually create an EC2 instance.

Ideally, you would want to connect to your instance. To do this, select the EC2 instance that you created and choose “Connect.“

  • Select “EC2 Instance Connect.”
  • Choose “Connect.” A window opens, and you are connected to your instance.

Stop EC2 Instances

After training with your instance, it is recommended to terminate your EC2 instance to prevent additional charges. When this is done, the EC2 instance and the data associated will be deleted.

In my case, I will have to temporarily stop the instance as I need it. To stop your instance, select the instance. Under instance state, select stop instance.

On the confirmation page, click Stop Instance.

Confirm-Instance-Stop

As shown below, the instance has been stopped.

Instance-stopped

I hope you found this article useful on How to create an EC2 Instance. Please feel free to leave a comment below.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x