Compare Amazon Lightsail vs. EC2 for your web app needs
Not all developers need, or want, the full capabilities of Amazon EC2. See if the scaled-back and simplified Amazon Lightsail is the better fit for your application.
Developers use Amazon Lightsail to quickly build websites and applications through a packaged set of capabilities. It's less configurable than Amazon EC2, but it's easier to deploy and estimate costs.
Amazon Lightsail is a virtual private server (VPS) that bundles compute, storage, networking and DNS. It also has built-in capabilities that include a managed database, load balancer, support for containers and content delivery network (CDN).
Lightsail is designed for speed and simplicity. The instances run on top of EC2 and are bundled with other AWS resources, though those services are abstracted so they're not visible to the user.
Still, this simplicity comes with tradeoffs. Amazon EC2 opens the door to far more ways to build, deploy and manage applications. It also remains the dominant AWS offering, alongside Amazon S3. But, for a subset of users, Lightsail is the better fit.
Let's take a closer look at the Lightsail vs. EC2 debate to see if you or your IT team could benefit from this VPS offering and if the pricing fits your budget.
Benefits of Amazon Lightsail
Amazon Lightsail is for businesses that want to spin up a server without having to work through all the pricing, configuration and management details associated with a typical AWS deployment.
Standardized applications and configurations
Developers can use Lightsail to build simple projects, such as a blog, website or basic e-commerce application, using standard applications and configurations. For example, to set up and configure a WordPress blog, you just select a platform and a blueprint, such as a pre-configured WordPress instance. The following diagram illustrates how media content is delivered within Lightsail using its load balancer, database and S3 for WordPress.
To do the same thing in EC2, you would need to provision the instance, add Amazon Elastic Block Store (EBS) block storage or Amazon S3 object storage, provision the image, and then configure all the different resources and applications.
With Lightsail, the same basic template can be created in a few clicks. This also makes it an attractive staging environment for testing out new applications or features before deploying them on live instances.
Lightsail presents a handful of options deployable at a predictable monthly price. However, the service is not ideal for applications that require a highly configurable environment or consistently high CPU performance, such as video encoding or analytics.
Lightsail vs. EC2: A feature comparison
The packaged nature of Lightsail makes it difficult to have a 1-to-1 comparison with EC2. IT teams need to connect AWS' flagship compute service with any number of other AWS offerings -- each with its own pricing structure -- to create a viable environment to build and deploy applications.
For the purposes of this comparison, we spotlight some Lightsail features and contrast those with what could be done natively in AWS when you use EC2 as the linchpin. All pricing listed below is based on the U.S. East Region.
Compute and block storage
When it comes to compute options, there is no comparison. Lightsail has seven virtual server sizes; EC2 has more than 480. Lightsail tops out at eight cores and 32 GB of memory; EC2 instances can get to 448 cores and 12,288 gibibytes (GiB) of memory.
But, again, the point of Lightsail is not endless options. If you want granularity and a massive range of configuration options, go with EC2.
Taken another way, Lightsail's solid-state drive (SSD) disk sizes range from 20 GB to 640 GB. You have far more flexibility with EC2, but in most cases, you need to sort out the attached instance storage separately through EBS. With Lightsail, that is all pre-configured. With EC2, the additional cost of EBS is $0.08 per gigabyte.
Plus, if you ever outgrow your VPS instance or need more control, you can take a snapshot and export it to a new instance in EC2.
Developers can use Lightsail containers as a relatively simple way to get started with loading standard Docker or other container images into the cloud. However, this service lacks the fine-grained controls of Amazon ECS or Amazon Elastic Kubernetes Service.
Lightsail containers cost significantly more for the raw resources. The basic container service costs $7 per month for one-quarter virtual CPU with 512 MB of RAM and goes up to $160 per month for four vCPUs with 8 GB of RAM. An equivalent EC2 instance is $6.25 on the low end and $127 on the high end. The Lightsail packages also include data egress quotas, which are an additional cost with EC2.
All container services come with a flat 500 GB per month of transfer quotas, which would otherwise add $45 to the EC2 equivalent. Although this may tip the balance in favor of Lightsail containers, the main benefit lies in making it easy to experiment with basic container principles rather than cost savings.
Lightsail load balancers distribute traffic across instances in different availability zones (AZs). This addresses scaling issues and improves performance and redundancy. The load balancer also handles certificate management.
However, Lightsail's load balancers aren't designed to deal with consistently high traffic volumes. AWS recommends developers use EC2 with Application Load Balancer instead for workloads that involve the following:
- handle more than 5 GB of data per hour;
- have more than 400,000 new connections per hour; or
- have more than 15,000 active connections running at the same time.
The Lightsail load-balancing service is priced at $18 per month. With EC2, developers can pick from Application, Network, Gateway and Classic Load Balancers. These services are charged on a consumption basis, so costs depend on the amount of traffic processed.
Content delivery network
The CDN does not work for AWS resources beyond Lightsail. EC2 works directly with Amazon CloudFront or third-party CDN services, and it's better suited for complex configurations or for workloads that require lots of requests or video streaming.
The bottom tier of the Lightsail CDN provides 50 GB per month free for the first year and then $2.50 per month afterwards. At the high end, 500 GB costs $35 per month. For Amazon CloudFront, traffic is charged based on data transfers out and HTTP requests. Data transfer pricing varies, with higher-volume tiers translating to lower per-gigabyte rates.
AWS supports managed databases in the standard and high availability Lightsail tiers. This simplifies the selection process for MySQL databases, as well as efforts to launch, secure, monitor and maintain those repositories.
The service automatically maintains a seven-day rolling backup of the database, and developers can configure longer-duration backups with snapshots, which are billed separately. These bundles are more expensive than Linux or Windows instances and have much more limited transfer allowances.
The high availability tier adds support for redundancy and failover to servers staged in different Amazon AZs. The standard managed databases start at $15 per month for 1 GB of RAM, 40 GB of storage and 100 GB of data transfers and go up to $115 per month for 8 GB of RAM, 240 GB of storage and 200 GB of data transfers. The high availability tiers are priced at double these rates.
Lightsail managed databases don't provide the same level of performance or throughput that larger databases, such as MongoDB or Cassandra, might require. EC2 instances with provisioned IOPS SSD storage are a better option than Lightsail in these cases.
Lightsail can work with other AWS database offerings. It supports Amazon DynamoDB, Amazon Relational Database Service and Amazon Aurora, but you may need to peer to a separate Amazon Virtual Private Cloud to make it work.
The peering technique can be used to connect to many, but not all, of the other AWS services. Peering is not required for smaller subset of services, including Amazon S3 and Amazon CloudFront.
Lightsail vs. EC2 pricing
Amazon Lightsail costs are lower for basic resource usage compared to the On-Demand Instances in EC2.
In terms of Linux/Unix, the smallest Lightsail instance, with 512 MB of RAM and 20 GB of SSD storage, is $3.50 per month. This is comparable to the EC2 equivalent, t3.nano, priced at $0.0052 per hour or about $3.38 per month. However, this instance type doesn't include SSD or data transfer costs. With a similar amount of SSD storage to the Lightsail package, t3.nano comes out to $4.98 per month.
At the high end, the $160 per month Lightsail package includes the following:
- 32 GB of RAM
- 640 GB of SSD storage
- 7 TB of data transfers
This is comparable to EC2 instance type t2.2xlarge, which comes with 32 GiB of RAM for $267.26 per month or $318.50 per month with 640 GB of SSD storage.
Additionally, Windows Lightsail servers are priced higher than the Linux variants due to licensing fees. The Windows plans start at $8 per month for the following:
- 512 MB of RAM
- 30 GB of SSD
- 1 TB of data transfers
The high-end Windows plan costs $240 per month and includes following:
- 32 GB of RAM
- 640 GB of SSD storage
- 7 TB of data transfers
Transfers and other fees
Some outbound transfer costs are included with Lightsail but not with EC2. The Lightsail packages include an allowance of between 1 TB and 7 TB of free data transfers, depending on instance size. EC2 instances still cost $0.01 per gigabyte transferred after the first gigabyte. This could add up to an additional $10 for 1 TB and $70 for 7 TB of outbound data transferred per month.
Data transfer savings represent one of the biggest cost differentiators between Lightsail and EC2. Note that the allowances are considerably smaller on other Lightsail services. However, it's not easy to dynamically scale Lightsail services up or down in response to load, which might result in higher costs if you need to overprovision resources to prepare for spikes.
Remember to delete
In theory, a developer can start and stop a Lightsail instance and save money when it does not run. In practice, AWS still charges for Lightsail instances even when an instance is stopped. To suspend charges, a developer must back up the instance and then delete it from Lightsail. But the enterprise must also pay another fee to keep an IP address in use -- to help maintain web server continuity -- that is no longer associated with the Lightsail instance, which adds $.005 per hour or $3.60 per month.
Each account is also limited to 20 Lightsail instances, five static IP addresses and three DNS zones. That might be fine for simple use cases, but an enterprise is unlikely to build a large-scale Lightsail deployment within these confines.
One major downside is that Lightsail does not dynamically scale as well as EC2. Any apparent benefits from a cost perspective may end up being spent on overprovisioning resources that are never consumed.
There are a variety of competitive VPS services from companies like DigitalOcean and Google Cloud. They each provide slightly different competitive advantages. For example, DigitalOcean focuses on simplifying the developer experience for provisioning standard services as Droplets, which simplify management. It also provides a developer-friendly UI that makes it easy to spin up a large library of pre-configured instances. DigitalOcean is priced comparably to Lightsail.
Google Cloud, on the other hand, is priced higher than competitive services. For example, an instance with 2 GB of RAM and 50 GB of storage is priced at $20.73 per month, compared to about $10 for a comparable offering from Amazon or DigitalOcean. However, Google has better integration with other Google services, including its various AI tools.
Companies that have other AWS applications should consider Lightsail since it can simplify integration and billing across multiple services. Other services make more sense when a company is first exploring or testing out various applications.
This article was republished to improve the reader experience.