How to Host a Website on AWS Lightsail

How to Host a Website on AWS Lightsail

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

Hostinger
$2.99 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How to Setup cPanel on AWS

A guide on how to setup WHM/cPanel on a centos EC2 instance on AWS
2 min read
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Run VPS Networks in AWS EC2

In this guide, we will look at how to set up Virtual Private Server (VPS) with A
4 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Launch and Administer a Windows Server 2012 R2 Instance on an AWS EC2

This tutorial shows you how to lauch and administer a Windows Server 2012 Instan
3 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to use Amazon RDS with your WordPress Installation

The default instance which is set up while creating an EC2 server with complete
3 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top