AWS Fargate is a serverless container management service (container as a service) that allows developers to focus on their application and not their infrastructure.
What are containers?
Before we talk about AWS Fargate, let’s talk about making software and containers. Making software applications behave predictably on different computers is one of the biggest challenges for developers. Software may need to run in multiple environments: development, testing, staging, and production. Differences in these environments can cause unexpected behavior, yet be very hard to track down.
To solve these challenges, more and more developers are using a technology called containers. Each container encapsulates an entire runtime environment. This includes the application itself, as well as the dependencies, libraries, frameworks, and configuration files that it needs to run.
What is AWS Fargate?
Before the invention of AWS Fargate, you had to make sure you had provisioned and managed servers to ensure that your container code could run anywhere. Amazon’s first entry into the container market was Amazon Elastic Container Service (ECS). While many customers saw value in ECS, this solution often required a great deal of tedious manual configuration and oversight. For example, some containers may have to work together despite needing entirely different resources.
AWS Fargate allows you to build and manage applications using serverless containers and works with both ECS and EKS. It lets you do this from anywhere and with limited resources. This is because auto scaling allows a Fargate task to seamlessly meet your application’s computing requirements.
Performing all this management is the bane of many developers and IT staff. It requires a great deal of resources and effort, and it takes time away from what’s most important: deploying applications.
In order to solve these problems, Amazon has introduced AWS Fargate. According to Amazon, Fargate is “a compute engine for Amazon ECS that allows you to run containers without having to manage servers or clusters.”
Fargate separates the task of running containers from the task of managing the underlying infrastructure. Users can simply specify the resources that each container requires, and Fargate will handle the rest. For example, there’s no need to select the right server type, or fiddle with complicated multi-layered access rules.
Selecting Fargate as part of your infrastructure is a big decision no matter what size company.
How Does AWS Fargate Work?
AWS Fargate is an improvement on ECS because it allows you to manage your containers without servers. The service Elastic Container Service (ECS) based. This is a platform that allows your virtual machines to manage the containers. Initially, AWS Fargate started with Amazon ECS. But ECS still required servers for managing containers. AWS Fargate launch type does not require any servers and is cloud-based. It does require that you create an AWS account.
AWS Fargate works more efficiently because it allows you to manage your containers without creating a cluster of virtual machines. This doesn’t mean that you don’t have control over task execution. You can create the containers such that they use an elastic network interface. This ensures that there are maximum efficiency and speed.
The virtual machine instances are responsible for maintaining the containers’ load balance. It also conducts regular upgrades and replaces containers that are failing. This is one of the biggest ECS on AWS Fargate.
AWS Fargate: Pros and Cons
AWS Fargate is an exciting technology, but does it really live up to the hype? Below, we’ll discuss some of the advantages and disadvantages of using AWS Fargate.
- Less Complexity
- Better Security
- Lower Costs (Maybe)
- Less Customization
- Higher Costs (Maybe)
- Region Availability
Pro: Less Complexity
These days, tech companies are offering everything “as a service,” taking the complexity out of users’ hands. There’s software as a service (SaaS), infrastructure as a service (IaaS), platform as a service (PaaS), and dozens of other buzzwords.
In this vein, Fargate is a Container as a Service (CaaS) technology. You don’t have to worry about where you’ll deploy your containers, or how you’ll manage and scale them. Instead, you can focus on defining the right parameters for your containers (e.g. compute, storage, and networking) for a successful deployment.
Pro: Better Security
Due to their complexity, Amazon ECS and EKS present a few security concerns. Having multiple layers of tasks and containers in your stack means that you need to handle security for each one.
With Fargate, however, the security of your IT infrastructure is no longer your concern. Instead, you embed security within the container itself.
Pro: Lower Costs (Maybe)
If you’re migrating from Amazon ECS or EKS, then Fargate could be a cheaper alternative. This is for two main reasons:
- As mentioned above, Fargate charges you only when your container workloads are running inside the underlying virtual machine. It does not charge you for the total time that the VM instance is running.
- Fargate does a good job at task scheduling, making it easier to start and stop containers at a specific time.
Want some more good news? In January 2019, Fargate users saw a major price reduction that will slash operating expenses by 35 to 50 percent.
Con: Less Customization
Of course, the downside of Fargate is that you sacrifice customization options for ease of use. As a result, Fargate is not well-suited for users who need greater control over their containers. These users may have special requirements for governance, risk management, and compliance that require fine-tuned control over their IT infrastructure.
Con: Higher Costs (Maybe)
Sure, Fargate is a cost-saving opportunity in the right situation when switching from ECS or EKS. For simpler use cases, however, Fargate may actually end up being more expensive. Amazon charges Fargate users a higher per-hour fee than ECS and EKS users. This is to compensate for the complexity of managing your containers’ infrastructure.
In addition, running your container workloads in the cloud will likely be more expensive than operating your own infrastructure on-premises. What you gain in ease of use, you lose in flexibility and performance.
Con: Regional Availability
AWS Fargate is slowly rolling out across Amazon’s cloud data centers, but it’s not yet available in all regions. As of June 2020, Fargate is not available for the following Amazon regions:
- AWS Fargate (EKS)
- Northern California
- São Paulo
- GovCloud (US-West and US-East)
- Cape Town
- Hong Kong
It’s nice to see a new idea with Fargate, that certainly has some potential, and already seems well fitted to some use cases.