Create an EC2 Instance In AWS

Promise Nwachukwu
5 min readOct 22, 2022
AWS

My journey so far with AWS has been an interesting one and that is why I am passionate about sharing the knowledge i have gained so far in AWS.

An EC2 instance i would say is one of the most used services in AWS therefore it is paramount to know how to create one. In the next steps below, I will be showing you how to get this done, so relax and have fun with me.

For you to create an EC2 instance, you first need to have an account with AWS. You can create one by visiting this link. Next, login and follow the steps below:

Search for “EC2” and click on the highlighted option as seen below:

Figure 1: Searching for EC2

Next, you click on “Launch Instance” and select the option that says “launch instance”.

Figure 2: Creating a new instance step 1

Fill in the following details:
a. Name: This is the name you would like to give your EC2 instance.
b. Application and OS Image: Now you have to choose an Image (Operating System) that you would like to run on your EC2 instance. The interesting part is that AWS has some images that are eligible to run on your EC2 instance called the “Free tier” when you are using the AWS free subscription. I used the word “eligible” because when you are using the free subscription and you wouldn’t want extra charges, those are the only images to use.

Figure 3: Creating a new instance step 2

c. Architecture: AWS has two architecture types for EC2 Instances
i. “64-bit(x86)” and
ii. “64-bit(Arm)

The main difference between the two is that “Arm” is RISC (Reduced Instruction Set Computing) based in other words it is much more power efficient in the way the chips are built, while Intel (x86) is CISC (Complex Instruction Set Computing). It is important to note that for every architecture you choose, there is an “ami” (amazon machine image) attached which means that changing the architecture changes the ami.

Wondering what is the real meaning of an ami?
It is simply a supported and maintained image provided by AWS that provides the information required to launch an instance

d. Instance type: This is simply the amount of CPU and memory you want to allocate to your EC2 instance. To make use of the free subscription provided by AWS, there are recommended instance types to use to avoid extra charges such as the “t1.micro” and “t2.micro”.

e. Key pair (login): AWS would always recommend that you either use an existing key pair or you create a key pair which would allow you access the EC2 instance which you have created. I am going to explain how to use the key pair to login to your instance. You can get full details here.

Figure 4: Creating a new instance step 3

Now once you have clicked on “create new key pair”, fill the page that opens in a similar way like this but of course you can use a different name for the key pair as seen in the screenshot below and you would observe that as soon as you click on the “Create key pair” button, the key pair automatically downloads to your PC as a file with a name like this “ec2-test-server.pem”.

Figure 5: Creating a new instance step 4

f. Network Settings: These settings are responsible for what provides connectivity for you from your local PC to your amazon EC2 instance.

g. VPC: You can make use of a default VPC and Subnet but it’s advisable to create a new VPC and Subnet if you would like to separate the EC2 Instances. Also take note to create a new security group for your EC2 instance and as advised below, ensure to allow access to just known IPs rather than exposing your EC2 instance to all traffics.

Figure 6: Creating a new instance step 5

h: Configure the storage: This specifically creates a volume where your Operating system and all other processes will be able to store their data within the EC2 instance.

Figure 7: Creating a new instance step 6

For the “Advanced details”, you can use the default settings already provided for you unless you have a previous knowledge of what you are doing.

Once you are done, select “Launch instance” at the right section under the summary column of the page as seen below and this will automatically create an EC2 instance for you.

Figure 8: Creating a new instance step 7

Now as you can see below, the instance is now created and ready to be accessed.

Figure 9: Creating a new instance step 8
EC2 Instance running

I hope this session was enlightening and you find it easy to create your EC2 instance in AWS.

I will like to thank Frank Legbosi for helping me with the subscription used during the practical session. Don’t forget to subscribe to this page and you can reach me here for further questions or concerns.

--

--