AWS - What are the exact differences between EC2, Beanstalk and LightSail?

Solution 1:

They are all based on EC2, the compute service from AWS allowing you to create EC2 instances (virtual machines in the cloud).

Lightsail is packaged in a similar way than Virtual Private Server, making it easy for anyone to start with their own server. It has a simplified management console and many options are tuned with default values that maximize availability and security.

Elastic Beanstalk is a service for application developers that provisions an EC2 instance and a load balancer automatically. It creates the EC2 instance, it installs an execution environment on these machines and will deploy your application for you (Elastic Beanstalk support Java, Node, Python, Docker and many others)

Behind the scenes, Elastic Beanstalk creates regular EC2 instances that you will see in your AWS Console.

And EC2 is the bare service that allows the other to be possible. If you choose to create an EC2 instance, you will have to choose your operating system, manage your ssh key, install your application runtime and configure security settings by yourself. You have full control of that virtual machine.

Solution 2:

In simple terms:

EC2 - virtual host or an image. which you can use it to install apps and have a machine to do whatever you like.

Lightsail - is similar but more user friendly management option and good for small applications.

Beanstalk - an orchestration tool, which does all the work to create an EC2, install application, software and give you freedom from manual tasks in creating an environment.

More details at - https://stackshare.io/stackups/amazon-ec2-vs-amazon-lightsail-vs-aws-elastic-beanstalk

Solution 3:

I don't know if my scenario is typical in any way, but here are the differences that were critical for me. I'm happier EC2 than EB:

EC2:

  • just a remote linux machine with shell (command line) access
  • tracable application-level errors, easy to see what is wrong with your application
  • you can use AWS web console panel or AWS command line tool to manage
  • you will need repeated steps if you want to reproduce same environment
  • some effort to get proper shell access (eg fix security rule to your IP only)
  • no load balancer provided by default

Elastic Beanstalk

  • a service that creates a EC2 instance with a programming language of your choice (eg Python, PHP, etc)
  • runs one application on that machine (for python - application.py)
  • upload applications as .zip file, extra effort needed to use your git source
  • need to get used to environment vs applications mental model
  • application level errors hidden deep in the server logs, logs downloaded in separate menu
  • can be managed by web console, but also needs another CLI tool in addition to AWS CLI (you end up installing two CLI tools)
  • provides load balancer and other server-level services, takes away the manual setup part
  • great for scaling stable appications, not so much for trial-and-see experimentaion
  • probably more expensive than just an EC2 instance