Lightsail - AWS Easy Mode
Tags: aws, beginners, cloud, cloudskills
Published: 2022-04-25 17:06:36

## Overview

Ellis Parry-Nweye and Justin Wheeler have analyzed the AWS product [Lightsail](https://aws.amazon.com/lightsail/) and provided their analysis here. The analysis was done by attempting to host a simple Java Spring Boot application on [Lightsail Instances]( https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-instances-virtual-private-servers-in-amazon-lightsail). These instances were fronted by a [Lightsail Load Balancer]( https://aws.amazon.com/lightsail/features/load-balancing). We leveraged [Lightsail Object Storage]( https://aws.amazon.com/about-aws/whats-new/2021/06/amazon-lightsail-now-offers-object-storage-for-storing-static-content/) to stage the jar file that we would deploy. 
The described architecture could be created using standard AWS services like [EC2]( https://aws.amazon.com/ec2/) for the instances, [ELB]( https://aws.amazon.com/elasticloadbalancing/) for the Load Balancing, and [S3]( https://aws.amazon.com/s3/) for the Object Storage. However, Lightsail aims to provide a single interface to provide the same functionality more simply. 


Lightsail even includes simpler variants of other AWS services not analyzed in the current project to keep the original analysis lightweight.
* CDN distributions; like [CloudFront]( https://aws.amazon.com/cloudfront/).
* Containers; like [ECS]( https://aws.amazon.com/ecs/).
* Databases; like [RDS]( https://aws.amazon.com/rds/).

## Result
The conclusions that were drawn from the project were as follows:
1. Lightsail can be summarized as "AWS Easy Mode ." The service offers everything that many customers will need and is significantly less daunting than using the other AWS services directly. Straightforward monthly pricing simplifies cloud spending similarly to [DigitalOcean]( https://www.digitalocean.com/pricing). Standard AWS pricing can be incredibly complex. 
1. Lightsail services can be limited and will certainly not be bleeding edge. The configuration options are less than those offered by the aligned AWS services. For instance, using the Lightsail Load Balancer is undoubtedly easier than using the AWS Elastic Load Balancing service. The configuration options provided there are severely restricted. It's not even noticeable which flavor of Load Balancer is used behind the scenes for the Lightsail variant. When the ELB service allows the user to choose the type used first, Application, Gateway, or Network. Then the configuration options explode further to provide complete control. 

## Facts
### Instances
The process to create an instance was plain and simple. The configuration options seemed lacking compared to the overwhelming number of those given within the EC2 console. There is even an option to create multiple instances in a single shot by modifying the quantity input box. Surprisingly the console requires an Availability Zone selection meaning that the bulk creation can only create multiple instances within a single AZ. That logic goes against AWS best practices and will hurt the architecture's high availability/fault tolerance.
 
![Lightsail Instances](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grl7hp9hsw6ypmwfnm3x.PNG)

One nice benefit of Lightsail instances is that they offer pre-configured click-to-launch applications and stacks that can drastically benefit teams using those services. Some of the popular offerings include WordPress and a LAMP stack. This feature was not explored during the project, perhaps only because a Java solution was not available. Albeit Java is not hard to configure either. The Amazon Linux OS option was selected, and [amazon-linux-extras]( https://aws.amazon.com/premiumsupport/knowledge-center/ec2-install-extras-library-software/) was used to install the required software. 

![Lightsail Instance Apps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzvgc1rzukq1vo6gve0d.PNG)

Every Lightsail instance comes with a built-in firewall relatable to a security group in EC2. HTTP and SSH are permitted by default, which doesn't feel very secure. Since this project did not require HTTPS, these default rules were suitable. Along with the firewall, a public IP and private IP can be found on the networking tab of the console. Interestingly a VPC did not have to be created. The assumption is that Lightsail is leveraging VPCs within an AWS-owned account. 

![Lightsail Instance Networking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1c0xdgtkvjzwnulasugk.PNG)

Moving on, Lightsail makes creating snapshots easy. These snapshots are a helpful backup tool but are required to resize the instance as well. An insufficient instance was launched for the first attempt that had to be resized to cope with the Java Spring Boot application's requirements. That discovery only occurred after the instance was bootstrapped. Unlike EC2, you will need to snapshot the instance and then launch a brand-new instance from that snapshot if you would like to scale up. Other helpful options were noted, such as the ability to copy to another region or even export the snapshot to EC2. 

![Lightsail Instance Snapshots](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avztw2mwqdm72z7zj02h.PNG)
 
Some final notes of importance are:
* Instance history is tracked, which can be incredibly useful in debugging endeavors and auditing purposes.
* Instance metrics are tracked, which can aid in debugging tasks.  
* It's easy to connect to the instance from the console. 
* IPv6 networking is also supported. 

![Lightsail Instance History](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7njynog32cpw1lhommk6.PNG)

### Load Balancer
For an instance, the Load Balancer was easy to create. Unlike the Elastic Load Balancing service, the Lightsail Load Balancer does not require Target Groups to be made, even if they may be used behind the scenes. The LB provides a DNS name that can be used out of the box. HTTP is enabled by default with the option to allow HTTPS if you conduct a couple of extra steps. That wasn't done since HTTP was sufficient for the use case. 

Unfortunately, it was impossible to disable HTTP, and there was no option to redirect HTTP to HTTPS like many services offer. This functionality is available for CloudFront and the ELB service, so, oddly, it was not included here. Further analysis uncovered additional features like session persistence that could be enabled with a simple checkbox. Overall, the Lightsail Load Balancer provided the required functionality with ease and without the bells and whistles that could overwhelm. 

![Lightsail Load Balancer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zne9u22hionl6oq9btxj.PNG)

### Object Storage
Object storage was not used that much during the experiment. It was primarily used to stage the jar file required to run the Java Spring Boot application. It's no surprise that creating a bucket was easy. The domain name is provided when the storage is made s3. This means that S3 is used to support Lightsail Object Storage.

Although, there were crucial differences. Upon creation, a user must choose a bundle that matches the storage and transfer they expect. This is probably to simplify the billing, yet it could mean that Lightsail Object Storage could be more expensive than S3 if you over-provision. Alternatively, if you under-provision, then overage fees per GB apply. 


![Lightsail Object Storage Pricing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr9se9edfg2bxgid012b.PNG)

Finally, a good number of features exist for the service, like permission management, metrics, versioning, and logging. These are a subset of what is offered by S3 and are likely very similar. Except most of these were not explored too much during the exercise. Permissions default to least privilege, again like S3. The instances that needed access to the files had to be granted access deliberately. The S3 CLI worked against the bucket when connecting from a Lightsail instance but connecting from outside Lightsail did not work. An invisible barrier separates the Lightsail Object Storage buckets from the S3 buck. There was the discovery of a migration path to S3 if the Lightsail feature set was outgrown. 

![Lightsail Object Storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9wq57wxgn94y3cxrcokd.PNG)

## Conclusion
In conclusion, Lightsail is an excellent service for the right people. It can be thought of as "AWS Easy Mode" as the features and configuration options will surely not overwhelm. The centralized console is polished without the pesky need to remember a hundred acronyms. The pricing is clear, which makes budgeting and planning a breeze. Lightsail offers migration paths that can be followed if the customer ever requires something more without starting over. 

To elaborate on “the right people” since it may be broad. The people that would benefit the most from Lightsail would be:
* Developers for prototyping work.
* New AWS users.
* Small scale companies.