AWS (Amazon Web Services) Lightsail is a cloud computing service that you can use to host web applications and website. The technology provides the simplest way to manage Virtual Private Servers.
The cloud architecture uses fast SSD-based storage, DNS management services and other features for low prices starting from $5 month. If you are starting out, you can test Amazon Lightsail free for one month.
In this guide, we will show you how to host your website on AWS Lightsail.
Prerequisites
- An AWS Lightsail account
- A domain name
Step 1: Create a Lightsail Instance
Once you sign up with Amazon Lightsail, you can create your first Lightsail Instance.
Click on ‘Create Instance’ to run your first VPS server.
You will be prompted to select an Operating System platform. Linux works well for web servers unless you specifically want to use Microsoft technologies such as asp.net.
On the ‘select a blueprint’, you can choose an operating system only or an OS bundled with packages such as WordPress. An OS only blueprint is more flexible because it allows you to customize package installation.
Then, choose Ubuntu 16.04 as the operating system because it is easy to use and you can find many articles about it on the web.
Towards the bottom of the screen, choose a plan for your instance, the $5 will work well when starting out.
Finally, name your instance and click ‘Create’ at the bottom of the screen
Your instance will be created automatically. Don’t worry if you see a pending status. The creation process will take a few minutes.
Step 2: Installing a web server on Amazon Lightsail Instance
Once your instance is created and you are sure it is running, click it to get more details about it. You will see a public IP address and a username that you can use to connect to your instance via SSH.
Up to this point, you only have an operating system on your instance. We need to install the Apache web server to server website content.
So, on the instance details page, click on ‘Connect using SSH’
Then, enter the following on the command line interface:
$ sudo apt-get update
$ sudo apt-get install apache2
Press Y and hit Enter when prompted to confirm the installation
Apache web server will be successfully installed on your instance.
If you enter your instance’s public IP address on your server, you should now see the default Apache Web page:
$ http://ip_adrress
Step 3: Point your domain to AWS Lightsail
Although it is okay to visit your website via an IP address, your visitors will need to use a domain name instead. Luckily, you can create DNS records on Amazon Lightsail that point backs to your instance public IP address
Then, you need to enter the DNS records on your domain name depending on where you purchased it. The DNS servers may look like this:
ns-806.awsdns-36.net ns-494.awsdns-61.com
Conclusion
In this guide, we have taken you through the steps of creating an Ubuntu 16.04 instance on AWS Lightsail. We have also installed Apache to serve our websites. As you can see, the entire process is quite easy and straightforward. Remember you can host as many websites as you want in a single instance. If you want more flexibility, you can upload your website files using FTP clients like Filezilla.
Check out these top 3 Best web hosting services
- Get the best cloud hosting and secure your valuable data.