Log into your AWS account, on Services go to EC2 section
Click on Launch Instance button. It will start the wizard. On Step 1 (Choose an Amazon Machine Image) we’re going the select the type of Operating System for our instance. I choose Ubuntu.
On step 2 you need to choose an instance type. Choose the
t2.micro instance type which is Free-Tier compatible.
We can skip the 3rd (Configure Instance Details), 4th (Add Storage), and 5th (Add Tags) steps without changing any of the default parameters since we don’t need for now any additional configuration at this point.
On Step 6 we will Configure a Security Group which is a set of firewall rules that control the traffic for our instance. Click on Add Rule button and select
HTTP, and then select
HTTPS. These will allow HTTP/HTTPS traffic in and out of the instance, making it accessible over the internet. The first rule, the
SSH directive, will enable us
SSH into the instance and make necessary updates, configurations, and installation.
When you finish click on the Review and Launch button. On step 7 (Review Instance Launch) you will find a summary of all settings of your instance. Click on the Launch button and You will be prompted to select or create a new key pair. Select “Create a new key pair” and set a name. Once this is done, download the key pair (make sure you do). Will will be using the downloaded key pair to
SSH into our instance shortly.
Click on Launch Instances to finish.
Extra: How to connect to EC2 w/ PuTTY (Windows)
To get access to your EC2 instance you need to connect through SSH. In my case, I use windows as my base O.S. so I’m going to use Putty to get access to my EC2 instance using the new keypair downloaded.
Open Puttygen and load button and look for the keypair file downloaded when you create the EC2 instance and click OK on the next dialog box.
Click on Save private key button and choose the folder on which you want to store it. Set a name for the private key (converted_keypair or the name you want) and Save.
Now Go to our EC2 instance, select the instance, click on connect button and copy the host address and username.
Open Putty and paste it on Host Name (or IP address) field.
Now, on Connection Category go to Data section and set the user on Auto-login username field.
Now expand SSH node and go to Auth section. Click on browse button and look for your converted keypair we did on the first steps.
Then go to Session category and set a name for your session on Saved Sessions field and click on Save button.
Click on Open button to open the connection, if everything was set up correctly you should be immediately logged in to EC2 instance.
I hope this can be helpful for anybody.