Create an EC2 instance step-by-step

Step 1: Sign up for AWS

AWS gives you 750 free Compute Hours per month and multiple other benefits. Sign up and follow the directions to create your account.


Step 2: Create an EC2 instance

  • Once you log-in to the AWS console, launch a Virtual Machine.

launch a VM

  • Click on Get Started. Get started

  • Name your instance, and change your location appropriately. As a rule of thumb, you should pick the location based on your target audience. name your instance

  • Select an Operating System (Amazon Linux AMI). You can choose others too, but for the sake of this article, I will pick Amazon Linux AMI. select Amazon AMI

  • Choose an appropriate size for the server based on your anticipated needs. t2-micro qualifies for FREE tier, and you can use it for a full year for testing purposes! t2-micro

  • Create a key pair so that it is easy for you to access the server using your private key. Ensure that you give an appropriate name, and hit the Download button.

create a key pair

CAUTION: Keep this file safe and don't delete it till you are using your server in AWS!  

AWS will warn you too! Click the button, and your PEM will start downloading.

  • Hit the Create this instance button. create instance

  • In just a few minutes your server will be provisioned. Proceed to the EC2 console. launch console

  • Now, you need to connect to the server. Click on the Connect button. It will ask you to open an SSH client (use PuTTY on Windows), and provide the command using which you can connect to the server. connect

  • Use the command to connect, and you will encounter the following error. connect using terminal

  • Don't worry, simply run chmod 600 the-good-ghost.pem and retry the previous command:

  • You will be connected to your server! Run sudo yum update if prompted, and you should be good to go.


HostGator Web Hosting