How to Create Ubuntu EC2 Instance on AWS free Tier?

Step by Step Guide to Create Ubuntu Server Ec2 Instance on Aws

How to Create Ubuntu EC2 Instance on AWS free Tier?

Home » Blog » Cookbook » Cloud » AWS » Ubuntu » How to Create Ubuntu EC2 Instance on AWS free Tier?
Are you ready to take your website to the next level? Want to impress your visitors with lightning-fast loading times and never-before-seen uptime? Look no further, my friend, because, with an Ubuntu EC2 instance on AWS free tier, you'll be able to host your website in the cloud and watch it soar! Imagine your website on a virtual supercomputer, accessible from anywhere in the world. Plus, by using Ubuntu, you'll be part of the cool kids club, with a ton of resources and a supportive community to help you out. And the best part? You can host your website on this virtual supercomputer for free for the first year! No more dealing with unreliable hosts or unexpected bills. With AWS free tier, you'll have all the power and flexibility you need, without breaking the bank. So what are you waiting for? Give your website the upgrade it deserves, and take it to the clouds!
Table of Contents

If you haven’t got AWS Free Tier already, go to this link, just follow the tutorial and get it right now. CHOP CHOP…

Here is a step-by-step guide for creating an Ubuntu EC2 instance on the AWS free tier:

Navigate to the EC2 dashboard

Sign into your AWS account and navigate to the EC2 dashboard.

Navigate to the EC2 dashboard

Launch Instance

In the navigation pane, click on “Instances” and then click on the “Launch Instance” button.

Launch Instance

Name your Instance

Name your instance, occasionally you can tag it too.

Name your Instance

In my case I’ve named it myec2instance.

Choose Ubuntu Amazon Machine Image

On the “Choose an Amazon Machine Image (AMI)” page, select the “Ubuntu” option from the list of available operating systems. (You can find it in the free tier selection section)

Choose an Amazon Machine Image (AMI)

Choose the Instance Type t2.micro

On the “Choose an Instance Type” page, select the instance type you would like to use. For the free tier, you can choose the t2.micro instance type.

Choose the Instance Type t2.micro

On this step of creating an EC2 instance, you are choosing the instance type that best fits your needs. The t2.micro instance type is a good choice for the AWS free tier because it is eligible for the free tier and it’s a good option for getting started with EC2.

The t2.micro instance type is a part of the “burstable performance” class of instances, which are designed to provide a moderate amount of CPU capacity and burstable performance when needed. These instances are ideal for low-memory, low-cost applications like micro-services, low-traffic web servers, and development environments. They are also cost-effective for testing and experimentation and running small applications.

Additionally, the t2.micro instance type is a General Purpose instance type, these instances are designed to provide a balance of CPU, memory, and network performance, which makes them a good choice for a wide range of applications.

For the AWS free tier, You can run a t2.micro instance for free within the service limits for 750 hours per month for 1 year. So it is a good starting point for experimenting with EC2 and learning how to use the service without incurring any charges.

Create a New Key Pair

A pop-up window will appear that will ask you to select an existing key pair or create a new key pair. If you don’t have any key pair, select “Create a new key pair” and give it a name, then download the key pair and save it in a secure location.

Create a new key pair

Give your key pair a name. I gave it roosho. Select key pair type RSA. In my case I want to use PuTTY. That’s why I selected .ppk. If you want to use OpenSSH, you can select .pem. Then Press Create key pair.

Creating Key Pair for Putty

Once you create the key pair. It will be downloaded automatically. Copy it somewhere safe.

The Created Key Pair

Configure Instance Details

On the “Configure Instance Details” part, you can configure various settings for your instance such as the number of instances to launch, the VPC and subnet to launch the instances into, and more.

This part allows you to customize various aspects of your instance, such as the number of instances to launch, the Virtual Private Cloud (VPC) and subnet to launch the instances into, and more. Some of the options available on this page are:

  • Number of instances: This setting controls the number of instances that will be launched. By default, the value is set to 1, but you can increase this value if you need to launch multiple instances.
  • Network: This setting controls the virtual network and subnet that the instance will be launched in. By default, the value is set to the default VPC and default subnet.
  • Auto-assign Public IP: This setting controls whether or not the instance will be automatically assigned a public IP address. By default, instances launched in a VPC are not automatically assigned a public IP address, but you can choose to enable this option if you want the instance to be reachable from the Internet.
  • IAM role: This setting allows you to specify an IAM role to assign to the instance. IAM roles allow you to grant permissions to AWS services, which can be useful for instances that need to access other AWS services.
  • Shutdown behavior: This setting controls how the instance behaves when it is shut down. You can choose whether the instance should be terminated or stopped when it is shut down.
  • Monitoring: This setting controls whether detailed monitoring is enabled for the instance. When enabled, you can use CloudWatch to monitor various metrics associated with the instance, such as CPU and memory usage.
  • Tenancy: This setting controls whether the instances launched are launched on a shared or dedicated hardware. By default, instances are launched on shared hardware, but you can choose to launch them on dedicated hardware if you need a higher level of isolation for your instances.

Most of the above settings are optional and you can leave the defaults if you don’t have any specific requirement. But you can always modify them later if needed.

Configure Security Group

On the “Configure Security Group” page, you can configure the security settings for your instance. Here you can specify which incoming traffic you want to allow to your instance. By default it allows SSH on port 22, which is sufficient for this tutorial.

Configure Security Group

If you want the instance to be a Web Server, you should check HTTPS and HTTP too.

Add Storage

On the “Add Storage” page, you can configure the storage for your instance. Here you can adjust the size of the root volume for your instance. For free tier it’s enough with 20GB.

Add Storage

You configure the storage for your instance on the “Add Storage” part. This page allows you to specify the size and type of storage to attach to your instance.

When creating a new instance, you can choose to add additional storage volumes to the instance. By default, an instance will come with a root volume, which is the primary storage volume for the instance. The root volume is where the operating system is installed and where you can store your application data. The size of the root volume is specified in gigabytes (GB) and can be increased or decreased based on your needs.

For the free tier of AWS, the most amount of storage that you can get on a root volume is 8 GB, with the t2.micro instance type. This storage is based on the General Purpose SSD, a type of storage that provides a balance of performance and cost, making it a good choice for most applications.

Also, there’s another type of storage EBS-optimized option, If the instance is EBS-Optimized the maximum amount of storage increases to 30GB. However, the additional cost for EBS optimization is not covered by the free tier.

Bear in mind that the free tier usage is subject to the service limits and you will be charged for additional usage if you exceed the free tier usage limits.

Review and Launch

On the “Summery” part, review the settings you have chosen and then click on the “Launch” button to launch your instance.

Review and Launch

Connect to Instance

When taken to Lunch an Instance, Click on Connect to Instance.

Connect to Instance

Access your Instance via Terminal

You can access your Ubuntu Instance via the local terminal of AWS or a remote terminal like PuTTY or any OpenSSH Application

Via AWS Terminal

If you want to connect via AWS Terminal, on the EC2 Instance Connect Tab click on Connect.

Connect via AWS Terminal

You will be brought to the AWS Terminal

Ubuntu Server on AWS Terminal

Via PuTTY

Remember I have downloaded roosho.ppk while creating key pair? That is what we will use to get access to our Ubuntu Server via Putty from local PC.

On the SSH client tab copy <username>@<public DNS> as marked

SSH Client Credentials for PuTTY

Put <username>@<public DNS>; on your Host Name text box on PuTTY and click + sign on SSH Category as shown in the image below.

Put <&#60;username&#62;@&#60;public DNS&#62; on your Host Name text box

Select Auth and click on Browse to select the PPK file you just downloaded.

Upload the PPK file

Select the downloaded PPK file and click on Open

Select downloaded PPK file

Click on Open to start the ubuntu server Instance created on AWS.

click open to start aws instance

Accept the PuTTY Security Alert

Accept PuTTY Security Alert

Here is your Ubuntu Linux EC2 Instance on AWS running on PuTTY

Ubuntu Linux EC2 Instance on AWS running on PuTTY

And there you have it folks, you can now create your very own Ubuntu Linux EC2 instance on AWS free tier and finally have a place to store all of your cat memes and GIFs. Happy cloud computing! On a serious note you can host your WordPress website, your PBX or your hosting panel on this instance.

author avatar
roosho
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
share this article.
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

Enjoying my articles?

Sign up to get new content delivered straight to your inbox.

Please enable JavaScript in your browser to complete this form.
Name