Search code examples
deploymentdockeramazon-elastic-beanstalkamazon-ecs

ECS or EB for a single-container application with Docker?


I deployed a single-container SailsJS application with Docker (image size is around 597.4 MB) and have hooked it up to ElasticBeanstalk.

However, since ECS was built for Docker, might it be better to use that over EB?


Solution

  • Elastic Beanstalk (EB) is a PaaS solution in AWS family and it provides very high level concepts: you have applications, versions and you create environments.

    EC2 Container service (ECS) is a very low level cluster scheduling platform. You have to manually describe a lot of configuration for your Docker containers, link them and also manually setup load balancers and everything else you need.

    So, EB is much simpler to use and maintain. ECS is more complicated, but it uses your resources in a very efficient way.

    Also, EB has two different Docker types: single-container and multi-container. Multi-container uses ECS internally.

    My advice: use Elastic Beanstalk. ECS is a good fit if you have big number of different applications that you need to run efficiently in a cluster.