Getting Started with Amazon Lightsail [Step-by-Step]

Hello learners, in this article we will be learning how we can use Amazon Lightsail in detailed. Amazon Lightsail and Amazon EC2 instances are one of the most used services of AWS and using Amazon lightsail can be beneficial for small-medium businesses.With that in mind, let's get started.

 

Overview on Amazon Lightsail

Amazon Lightsail is a virtual private server service that offers a wide range of templates to select from. It is also known as a virtual machine or a virtual private server, and it's simply a server with none of the physical properties. Lightsail provides infrastructure, as well as the cost-effectiveness of maintaining and managing the application, scalability, and ease-of-use features. It simplifies the process of hosting a website or server on a cloud platform. Amazon Lightsail is basically a simplified version of Amazon Elastic Compute (EC2).

Advertisement

 

Overview on WordPress

WordPress is a free, open-source website builder that you can use to make your own website or blog. It allows you to create and manage your own full-featured website without having to learn how to code using only your web browser. WordPress is the most user-friendly and powerful blogging and website-building platform available today, and it works well for both small and large websites.

 

Comparison between EC2 and Lightsail

  • Amazon Lightsail instances are significantly less expensive than EC2 instances. Various outbound charges are included with lightsail instances, such as a 5 TB internet data transfer allowance for each lightsail instance. EC2 instances do not include outbound expenses.
  • For applications that require a highly flexible environment or high CPU performance, Lightsail might not be the best choice. Only small developers would benefit from Lightsail, whereas applications requiring high CPU performance or a highly flexible environment would be perfect for Amazon EC2. EC2 is designed for large organisations.
  • Lightsail does not have a specific web service interface. The AWS administration console does not provide direct access to Amazon Lightsail instances. Amazon EC2 instances are virtual machines with Amazon's web service interface.
  • Amazon Lightsail is a pre-configured environment that includes everything you'll need to deploy a project up and running. In simple words, Lightsail is a subset of EC2 that provides a previously defined set of options to choose from, based on project requirements, such as SSD-based storage, DNS administration, static IP, compute environment, and, above all, a predetermined pricing.
  • AWS Lightsail can be used for simple web applications and websites, including custom code, and common CMS, whereas EC2 can be used for small scale to Enterprise applications such as HPC, big data, and analytics workloads.
  • Lightsail does not enable automatic instance scalability. After a launch, instances cannot be changed. To update your plan, you must start a new instance. An Amazon EC2 Auto Scaling group can be used to scale instances automatically. EC2 instances can be changed to a different type or virtualisation.
  • It only takes a few clicks to deploy an application in Lightsail which provides a one-stop shopping experience. The type of programme, the type of components utilised, and other criteria all influence how an application is deployed in Amazon EC2.
  • Customers can add rules to the Lightsail firewall which is controlled by AWS, whereas EC2 is managed by the customer using VPC and related components.

 

Using Amazon Lightsail

Step 1: Create an Instance under Amazon Lightsail

1. Login to AWS management console and navigate to Amazon Lightsail.

Amazon Lightsail

 

2. Now, go to the Instance tab and click on the “Create Instance” button. You should now select the region which is closest to your location for better latency.

Getting Started with Amazon Lightsail [Step-by-Step]

 

3. Select the instance image you need. Here we have selected Linux/Unix as the platform and WordPress as the Application.

Getting Started with Amazon Lightsail [Step-by-Step]

 

4. Select your instance plan i.e choose the instance plan according to your requirements.

Getting Started with Amazon Lightsail [Step-by-Step]

 

5. Enter a name for your instance and a number of instances you want to launch:

Advertisement
  • Instance name must be unique within each AWS Region in your Lightsail account.
  • The instance name can contain 2 to 255 characters.
  • An instance name can include alphanumeric characters, numbers, periods, dashes, and underscores.

Getting Started with Amazon Lightsail [Step-by-Step]

 

6. Click on the “Create instance” button and the instance will be created in a few minutes.

Getting Started with Amazon Lightsail [Step-by-Step]

 

7. Create a static ip address for your wordpress instance, so that the instance ip address will not change for every shutdown/restart.

Getting Started with Amazon Lightsail [Step-by-Step]

 

Step 2: Connect the WordPress Instance

Connect your instance through the SSH client.

Getting Started with Amazon Lightsail [Step-by-Step]

 

Step 3: Login to the WordPress Instance

1. Find the password of WordPress account using the following command.

cat $HOME/bitnami_application_password

Getting Started with Amazon Lightsail [Step-by-Step]

 

2. Sign in to the WordPress admin dashboard by using your static_ip/wp-admin.

Getting Started with Amazon Lightsail [Step-by-Step]

NOTE:

Default username of the wordpress is user. Remember to change your credentials after you login for security purposes.

 

Step 4: Configure Custom Domain to WordPress Instance

1. Add two A records pointing to your WordPress instance IP address in your domain provider portal.

Getting Started with Amazon Lightsail [Step-by-Step]

2. Wait for ten minutes for the DNS propagation to be done.

Advertisement

3. You can see that the domain is running with our WordPress instance now but it is not SSL protected , so we will now install LetsEncrypt SSL Certificate for our domain.

Getting Started with Amazon Lightsail [Step-by-Step]

4. SSH into our WordPress instance.

5. Run the following command

sudo /opt/bitnami/bncert-tool

Getting Started with Amazon Lightsail [Step-by-Step]

 

6. Enter your domain and its subdomains and give yes or no to the required details.

7. Wait for two minutes to see that Letsencrypt SSL is configured with our domain.

Getting Started with Amazon Lightsail [Step-by-Step]

 

8. Now, we can see that our wordpress instance is online with our custom domain and secure SSL Certificate.

Getting Started with Amazon Lightsail [Step-by-Step]

 

Bonus

AWS Lightsail also has Loadbalancer , Storage , containers and database services which can be very useful when deploying applications. Lightsail also has automatic snapshots which will preserve the data of the instance at a specific time and you can use the snapshot to easily create the instance.You can use Amazon CLI also to create and remove Lightsail snapshots.

 

Conclusion

In this article, we have learnt how to use the Amazon Lightsail to deploy a WordPress Instance. Amazon Lightsail is a virtual private server which simplifies the process of hosting a website or server on a cloud platform. If you are just getting started in AWS , then please check out our other articles on Cloud. Please let us know if you encounter any issues on the commands above in the comments.

 

Further Reading

Amazon Lightsail

 

Didn't find what you were looking for? Perform a quick search across GoLinuxCloud

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can either use the comments section or contact me form.

Thank You for your support!!

Leave a Comment