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.
Name your instance, and change your location appropriately. As a rule of thumb, you should pick the location based on your target audience.
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.
Choose an appropriate size for the server based on your anticipated needs.
t2-microqualifies for FREE tier, and you can use it for a full year for testing purposes!
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
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.
Create this instancebutton.
In just a few minutes your server will be provisioned.
Proceed to the EC2console.
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.
Use the command to connect, and you will encounter the following error.
Don't worry, simply run
chmod 600 the-good-ghost.pemand retry the previous command:
- You will be connected to your server! Run
sudo yum updateif prompted, and you should be good to go.