Go to https://aws.amazon.com
From the top right-hand corner select My Account, and click on AWS Management Console, Here you can sign in or create a new AWS account.
Once signed successfully, it should take you to the AWS Management Console. Now select EC2 under the Compute.
This will bring you to the EC2 Dashboard. Now select Launch Instance.
Here I’m going select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type – ami-ba602bc2 Now click Select
Now we need to choose an instance type. I have decided to stay with the free tire. So go ahead and click on the t2.micro and then select configure instance details
Since this server is an experimental server I’m going to stick the default settings. Now you should see add storage window, keep everything as it is and click on Review and Launch.
By now you should be at Step 7: Review Instance Launch window
Now go ahead and click on Launch. This should ask you to create a new key pair or use an existing key pair. Select create a new key pair from the drop-down. When you naming your key make sure there are no spaces. I have named my key pair as myUbuntu. Now click on download key pair. DO NOT LOSE THIS! Now click on Launch Instance.
Now click on the AWS logo on the top left corner, this should take you to the AWS console dashboard. From here click on the EC2 under Compute. Now you should see we have the newly created instance is up and running. Make sure to give a name, I have decided to name my instance and myUbuntu.
So far so good! Now we need to connect to the instance. Select your newly created instance and click Connect.
Brilliant! now locate your .PEM file and open a new terminal window, and type chmod 400 myUbuntu.pem this will make set the correct permissions for us to connect to the remote host.
Now we can SSH into our server ssh -i "myUbuntu.pem" email@example.com