AWS ECS and Fargate: Understanding the Differences

Anuj Shashimal
2 min readJul 30, 2020

This article about the comparison between AWS ECS and Fargate when I’m doing the project in my industry. If you are a DevOps engineer you must know these two approaches to decide on your software.

EC2 vs Fargate

What are containers?

Before we talk about AWS container as a services let’s talk about containers. If you are going to planning to get the most valuable container as a service first you need to know what are containers. If you are in the IT industries, you need to develop the software for a lot of development environments. Such as development, testing, staging, and production. The difference between these environments can cause unexpected behavior, very hard to track down.

To avoid these challenges, Developers are used technology called containers. Each of the containers embedded with an entire runtime environment. This included the individual libraries, configuration files, and frameworks itself to run. Now I assumed that you have basic knowledge of containers. That’s enough! Before we comparing these three containers as services let's get quick knowledge about what are these.

ECS vs Fargate? What is the better mechanism to deploy your application?

If you are going to ECS approach, inside the EC2 instance that runs the Container agent. You have to manage all the EC2 instances on your own. The main advantage is you only have to pay for the EC2 instances. But you have to run a cluster of container instances to managing the auto-scaling group. Therefore you have to scale, monitor and secure the EC2 instances on your own. ECS has low security. Because If have multiple layers of tasks and containers means that need to handle security for each one. That’s is not good at all.

If you are going to the Fargate approach, prices calculated per vCPU and per ram usage. Fargate can follow Better security. Fargate can embed security within the container itself. It’s is good when comparing the ECS approach. You don’t have to manage the EC2 instances on your own. Before Fargate doesn’t have any mechanism to managing the EFS integration. After the 2020 July, AWS gives EFS integration for both Fargate and ECS approaches.

Summary

My opinion is that comparing the price and operation effort better approach is AWS Fargate.

--

--