AWS Elastic Beanstalk or AWS LightSail — When to use which?

Latt
3 min readFeb 26, 2020
AWS Elastic Beanstalk vs Lightsail

The question that you should be asking is how much control you want over the underlying resources? If you need more flexibility on configuration, stop reading this now and go with Elastic Beanstalk. But if you just want to run a simple application in the cloud, Lightsail might suit your need.

Elastic Beanstalk

Elastic Beanstalk is an easy-to-use service that manages, deploys, and scales Web App by handling capacity provisioning, load balancing, auto-scaling, and application health monitoring. Under the hood, it uses Cloud Formation to provision its resources such as EC2 Instances, Auto Scaling Group, Load Balancers, S3 and optionally AWS Relational Database Service (RDS).

Database: It is recommended to provision Database (RDS, DynamoDB) independently to decouple the database instance from the application environment’s lifecycle.

Lightsail

Lightsail is a newer offering from AWS best suitable for a simple workload (e.g. Running a simple monolithic PHP app). It gives you a pre-configured Virtual Private Server platform with the simplified management console. It’s similar to Digital Ocean droplets if you are familiar with them.

Lightsail plan comes in a bundle with a fixed amount of RAM, vCPUs, SSD and a free data transfer allowance, with static IP addresses and DNS management.

Database: You can optionally add a Lightsail managed database for the stateful applications. It’s also a fixed size offering.

Upgrade to EC2 when you want more control later with Lightsail. It creates a copy of your Lightsail in EC2.

Note: Exporting Ghost and Django instance manual snapshots to Amazon EC2 is not supported as of Feb 2020.

The following section discusses distinct characteristics between Elastic Beanstalk and Light Sail.

Supported Platforms

Both services support the platforms extensively. But particularly, if your application is dockerized, Elastic Beanstalk would be a better fit.

Elastic Beanstalk:

  • Apache Tomcat for Java applications
  • Apache HTTP Server for PHP applications and Python applications
  • Nginx or Apache HTTP Server for Node.js applications
  • Passenger or Puma for Ruby applications
  • Microsoft IIS 7.5, 8.0, and 8.5 for .NET applications
  • Java SE
  • Docker (Single Container, Multicontainer, Pre-configured Docker)
  • Go

For more detail on Elastic Beanstalk Platforms: https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html

Lightsail:

Lightsail offers a range of operating system and application templates that are automatically installed when you create a new Lightsail instance. Application templates include WordPress, Drupal, Joomla!, Ghost, Magento, Redmine, LAMP, Nginx (LEMP), MEAN, Node.js, Django, and more.

For more details on Lightsail Platforms: https://aws.amazon.com/lightsail/features/?opdp2=features

Available Regions

Lightsail is not available in all of the AWS regions yet as of Feb 2020. E.g. Hong Kong. If you need your app to be running in the same region as where you are (e.g. due to data restriction), consider Elastic Beanstalk.

Autoscaling

Elastic Beanstalk uses EC2 Autoscaling Group to handle elasticity.

Lightsail doesn’t support autoscaling, you have to manually add an app yourself.

Network Connectivity

You can deploy Elastic Beanstalk into existing VPC. VPC requirement is that Elastic Beanstalk Instances in the subnet must have access to the Internet.

In Lightsail, you can connect to private AWS resources such as RDS with VPC peering. To enable VPC peering in Lightsail, you need to have a default VPC. (More info on Lightsail VPC Peering: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-vpc-peering-with-aws-resources)

The End. Hope this helps!

--

--

Latt

#cloud #devops #team_management #application #development