This speed tutorial is for anyone technically savvy enough to have dabbled in AWS but who has been hesitant to explore the heavy duty world of server setup. If you have an existing AWS account and if you're at lease moderately familiar with their web console, these steps can be done in as little as 5 minutes, I promise. But first I'll warm things up with a bit of an introduction to Amazon Elastic Compute Cloud (EC2).
EC2 is the backbone of Amazon Web Services (AWS). It's a computing service which allows you to rent virtual servers to run your own software. As a cloud based solution it is nearly infinitely scalable, and you can spin up as many server instances as you require and each is configurable on an extremely granular level. This guide is not a comprehensive list of all that can be done with EC2. In fact the goal is to minimize the configuration as much as possible.
We will be accessing the server through SSH client built into your computer's command line interface. For Mac users, you'll be using Terminal.
A note on cost. The server spun up in is tutorial is free tier eligible, meaning, if your account is less than a year old there should be no fees incurred. For accounts that do not fall under free tier, the cost will be subjected to the standard EC2 pricing model, with t2.micro priced at $0.0116 per Hour in US East.
cd ~/path-to-file-here && chmod 400 key-name-here.pem
ssh ec2-user@ec2-#-##-##-##.compute-1.amazonaws.com -i key-name-here.pem
sudo suNow here's the big one. With the following command you'll install an Apache web server navigate to the web server root and create an index.html file.
yum update -y && yum install httpd -y && service httpd start && chkconfig httpd on && cd /var/www/html && echo "<html><html><body><h1>This is My Website</h1></body></html>" > index.htmlThat command will take a while to run, but once it's done, you can paste your Public DNS address into your web browser and your web page should be visible!
Amazon has a similar tutorial on their developer site. It's steps are sightly different but will achieve similar results. https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html