4

I want to migrate from Heroku to Amazon AWS and I would like to deploy my app in Docker image. So the app consists of:

  • Web server (node.js -> docker image)
  • Worker (node.js -> docker image)
  • Postgres database (Amazon RDS)
  • Redis instance (Amazon ElatiCache?)

With my app I (Web+Worker):

  • I have to be able to scale both web and worker instances manually or auto.
  • update with new image with zero-downtime
  • see realtime/history metrics
  • see realtime/history logs

And now when studying Amazon docs I found "Elastic Beanstalk" and "Amazon EC2 Container Services (ECS)". I was wondering which one should I use to manage my application (docker images)? What is a difference between them?

user606521
  • 14,486
  • 30
  • 113
  • 204

1 Answers1

7

AWS Elastic Beanstalk uses the Amazon EC2 Container Service under the hood for its Multicontainer Docker Environments, and the difference is addressed by the resp. FAQ How is Amazon ECS different from AWS Elastic Beanstalk?

AWS Elastic Beanstalk [...] keeps the provisioning of building blocks (e.g., EC2, RDS, Elastic Load Balancing, Auto Scaling, CloudWatch), deployment of applications, and health monitoring abstracted from the user so they can just focus on writing code. You simply specify which container images are to be deployed, the CPU and memory requirements, the port mappings, and the container links. Elastic Beanstalk will [...] handle all the details such as provisioning an Amazon ECS cluster, balancing load, auto-scaling, monitoring, and placing your containers across your cluster.

[...] You can work with Amazon ECS directly if you want more fine-grained control for custom application architectures. [emphasis mine]

Furthermore, only Elastic Beanstalk supports Heroku's push deployment model (see the deploy command of the EB Command Line Interface), so for your scenario I would definitely recommend to look into Elastic Beanstalk's Multicontainer Docker Environments, rather than using Amazon ECS directly.

Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
  • 1
    It would be great, If you list down the fine-grained control in ECS that we do not get in EB. – Lakshman Diwaakar Dec 05 '16 at 05:48
  • @LakshmanDiwaakar It's mentioned: "provisioning an Amazon ECS cluster, balancing load, auto-scaling, monitoring, and placing your containers across your cluster" – LoMaPh Aug 26 '19 at 19:03