1. Home
  2. /
  3. Web
  4. /
  5. How to create EC2 instance and install Ubuntu server on AWS?

How to create EC2 instance and install Ubuntu server on AWS?

create EC2 instance and install Ubuntu server on AWS


By opting for AWS services one can eliminate the need for investing in hardware resources and just focus on development and deployment of web applications. Amazon EC2 or Amazon Elastic Compute Cloud provides scalable computing capacity which is popularly known as Amazon Web Services (AWS) Cloud.

Click to read more about what is Amazon EC2?

This article provides quick steps to create an EC2 instance in AWS that can be used to install Ubuntu server.

EC2 Instance: How to create an EC2 Instance?

To create an instance you must be logged into your AWS console.


  1. Click on the link EC2 (after login). If you’re not able to find the link try searching for “EC2”.
  2. Click on EC2 >> Instances >> Launch Instance.
  3. Choose an Amazon Machine Image (AMI). A page will open up with the list of AMIs.
  4. Select Ubuntu Server Ubuntu 22.04 LTS (or, latest version if available)
  5. Choose an Instance type. Click on the checkbox, General purpose t2 Micro (it may be selected by default).
  6. Click on Next: Configure Instance Detail. Click on checkbox, Protect against accidental termination. And, leave everything as default.
  7. Click on Next: Add Storage. In the size field, type your required disk size. By default its 8GB (In case of free tier, Max. 15GB can be alloted). Leave other options as default.
  8. Click on Next: Tag Instance. Leave as default.
  9. Click o Next: Configure Security Groups.
  10. SSH will be added by default. Click Add Rule. Click on the Type. And, add HTTP from the list.
  11. Again click Add Rule and add HTTPS.
  12. Leave the settings protocol, port range and source as default.
  13. Click on review and launch.
  14. Review Instance & Launch. Click on Launch. A small window will appear for key-pair. From the dropdown, select create a new key pair.
  15. Enter the name of key pair, keep the name same a project url or name so that its easier to remember.
  16. Download the key pair i.e. .pem file. And, save it safely. If this key is lost.. you will loose access to the instance.
  17. Click on launch instance.
  18. Click on view instance.

After creating an instance, associate an elastic IP with it.

Associate an IP or elastic IP with the EC2 Instance

  1. Creating the Elastic IP. In the EC2 dashboard. Click on Network & Security. And, then Elastic IPs.
  2. Click on allocate new address.
  3. Click on allocate. And, IP will becreated.
  4. Associate elastic IP with EC2 Instance. On the same window, right click on the IP you just created and click on Associate Address.
  5. A small window will appear with the name Associate Address.
  6. Select your respective instance ID from the dropdown (double check if you have more than 1 instances on your AWS account).
  7. Select private IP from the dropdown.
  8. Click on Associate.

After the association, connect with the Instance using Putty and the downloaded key-par or .pem file..

Reviews & Ratings Get your stoe online with Shopify in 60 minutes Shop Now