<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=521127644762074&amp;ev=PageView&amp;noscript=1">

Deciding on Amazon ECS vs. Kubernetes for Container Orchestration

When it comes to container orchestration, Kubernetes has become the de-facto standard for managing and running containerized workloads in production. “Openness” is one of the main reasons why Kubernetes has leapfrogged the competition, primarily driven by its open source roots. Kubernetes brings a thriving open source ecosystem that takes advantage of the platform’s modular design. Almost every cloud provider has integrated the software as a native service, establishing a new category known as “Managed Kubernetes”. The big players include AWS Elastic Kubernetes Service (EKS), Azure Kubernetes Service (AKS), and Google Cloud’s Kubernetes Engine (GKE) offering.

However, some cloud providers like AWS offer additional container orchestration options. Amazon’s Elastic Container Service (ECS) is one example, and it’s native to the AWS platform. In this post, we’ll shed some light on the pros/cons of ECS, Kubernetes, and recommended approaches.

Understanding AWS ECS and AWS Fargate

AWS ECS comes in two flavors: ECS powered by Fargate, and ECS powered by EC2.

Traditional ECS - powered by Amazon EC2 compute - was launched in 2015 as a way to easily run Docker containers on the cloud. Traditional ECS gives you underlying control over the EC2 compute options for your containers. This flexibility means you can select the instance types to run your workloads on. It also hooks you into other AWS services used for monitoring and logging activity on those EC2 instances.

Fargate, on the other hand, was released in 2017 as a way to run containers without having to manage the underlying EC2 compute. Instead, Fargate automatically calculates the desired CPU and memory requirements. Fargate is usually a good option if you need to get a workload up and running quickly and don’t want to bother calculating or figuring out the underlying compute options.

Given these options, when does ECS make sense?

  • You have small workloads that do not have many dependencies on other services
  • You expect your workloads to be short-lived and only need to run for a period of time.
  • You do not see significant architectural changes on the horizon
  • You have a containerized application and you need to get up and running quickly

When comparing the two services, traditional ECS offers the most flexibility. One possible migration path is starting on Fargate and then moving to traditional ECS when you need more operational agility.

Are you outgrowing ECS?

That said, most companies have a growing application and service footprint, driven by product roadmaps and customer requests. In these situations, it’s possible to outgrow ECS for your container orchestration needs. Consider the following business situations:

  • Cloud cost and resource efficiency are gaining importance: If you expect to scale your workloads and have them run continuously, ECS could become an expensive option depending on what flavor of service you’re using. For example, Fargate abstracts away the underlying compute, which means you have less control over fine-tuning which instance types may be running.
  • You are growing the number of apps and services running in the cloud: As your apps evolve, so does your architecture. ECS may become too limited in terms of what you need to efficiently scale and operationalize your workloads.

For example, the Fargate service can have slow launch times, mostly because you’re leaving the compute decisions to Amazon in favor of a more simplified operational experience. 

The Exit Plan

It’s perfectly fine to start out on ECS when you have a small number of services, but ensure you have an exit plan to another PaaS, like EKS or Kubernetes, when you need flexibility and control.

  • You do not want to be locked into a single cloud provider: There may come a time where your CFO asks you to evaluate other cloud providers for cost-savings measures. Or maybe you want to leverage best of breed services outside of AWS. In any scenario, you may want the flexibility to choose your cloud provider of choice, especially as the cloud compute layer becomes more commoditized over time. According to a 2018 CNCF survey, 42% of respondents use cloud-native technologies for cloud portability.
  • You want to become more agile: Cloud-native technologies enable greater velocity and faster time to market. Containers help deliver part of this business value. However, without a robust container orchestration strategy, you risk multiple teams in your organization adopting different patterns - which can create complexity in the future. 

If any of the above situations are relevant to you, then consider a strategy for graduating from ECS to a more modern platform like Kubernetes. Learn more about the benefits of Kubernetes and options for moving away from ECS in our next post: The Benefits of Managed Kubernetes vs. Amazon ECS


Managing Kubernetes Configuration Read the Whitepaper