AWS FARGATE OVERVIEW
Published: 2023-12-28 02:46:06

AWS Fargate is a scalable, serverless managed service by Amazon Web services which is a compute engine for Amazon Elastic Container Service (ECS) that can deploy and manage containerized applications in the cloud and ensures it is highly available. What is it mainly used for? To start with, you can run containers with it and you don't even need to create or manage any server or cluster which is good. Since it is a computational engine, as a customer you don't need to worry about managing EC2 instances at all or any infrastructure. So what are you required to do as a customer? You can start by paying for resources per application which you have specifically chosen. You get to design and develop your applications as well as package it in containers. You are free to work on the memory and CPU requirements, IAM policies too. Also works with Amazon Elastic Kubernetes Service (EKS), Amazon Simple Storage Service (S3) and Amazon CloudWatch. Another thing to note is that it is cost effective, you only pay for used resources.


**FEATURES**
1)Can manages cluster of servers for users as well as the EC2 instances

2)Clusters can be optimized



3)Easy scalability of applications



4)High availability of infrastructure which is needed to run application

5)Integration with ECS

6)You only need to pay for the amount of time the task makes use of the resources

7)AWS Fargate helps you to match the needs of your application to suit the size of the memory of your workloads.

8)Networking support for every Fargate task is which is completed in your virtual private cloud (VPC).

9)Monitoring and Logging: logs for your applications can be sent CloudWatch logs through AWS Fargate. 






**Components Of AWS Fargate**

**Amazon ECS:** With the API which Amazon ECS provides to interact with AWS Fargate, the use of other services such as Amazon CloudWatch and CloudFormation is allowed, in order to manage and monitor your containers is possible which aids in managing your container as well as monitor it.

**Clusters:** You can group multiples of services which your tasks needs to run smoothly. AWS Fargate helps to manage your clusters.

**Networking:** AWS Fargate has networking capacities including Virtual private network (VPC) as well as security groups which it provides for your application containers to encourage communication between resources and containers in your VPC.

**Task Definition:** This is basically a file with text which gives a clear description of containers in your application including the the specifications for your application. This information is usually stored in a Jason formatted file.

**Tasks:** After creating the task definitions, the next step should be to initialize the tasks definition. In your cluster, You can decide how many tasks that will run. You can keep it simple and run few or run multiple tasks at the same time.

**Services:** With ECS service you can run tasks you have created in the ECS cluster which can be single or multiple at the same time.

**Container Image:** This is a software package created from a docker file  that consists of everything needed to run your application

**Compute resources:** AWS Fargate provides the basic compute resources and scalability needed to run your application container. These include CPU and memory with specific amount which each container needs according to definition of tasks. 




**Benefits of AWS Fargate:** 
1)**Simplicity:** AWS Fargate has a simple infrastructure that can be accessed by any level of expertise. Getting started is easy without the need to worry about provisioning or scaling compute resources, or managing the operating system, networking, and storage configuration. You just need to focus on building and deploying your applications.
Most of the underlying infrastructure, is taken care of by AWS which  allows developers to focus solely on applying development.

2)**Scalability:** When you choose to work with AWS Fargate, you don't need to worry about the scalability of your compute resources or scaling your containers since it will be done for you by AWS Fargate automatically.

3) **Saves Money:** AWS Fargate is very cost effective, with this service you only pay for what you use saving you money. As a serverless compute resource, it operates on a Pay-As-You-Go model.

**4)Serverless:** With AWS Fargate you do not need to worry about setting up servers as well as managing it for your containers about customizing and managing the servers; your containers will still run on them.

5) **Security:** One of the features of AWS Fargate is security. It comes with the service. There is isolation and safe communication between containers. When it also gets combined with the AWS IAM, this helps to make the security your applications even stronger. So, you don't need to worry about the security of your applications.

6)**Monitor:** It can be combined with Amazon CloudWatch to provide consistent monitoring for your applications.


**LIMITATION:** 

**Lack of Control:** Since AWS Fargate does the work for us of managing our applications, it means you don't have much control over how your applications is run, whether is cluster sizing, or configurations, your own choice of a particular instance with which your containers will run on. As a result, you cannot customize it to your needs.

**Cost:** If you have  lots of small services that are rarely used, or if your application requires a lot of resources, or even for simple tasks, it can be a lot cheaper to use ECS instead. You have to bring your own EC2, but it still does all the container management for you.

**Availability:** Fargate pods cannot be deployed to AWS region, AWS Wavelength, or AWS Local Zones.
Fixed regional availability
Fargate service is not available in all regions/zones. Also, far fewer EKS supporting regions support Fargate.

**Lack of GPU Support:** There is no support for GPU instances on AWS Fargate and so they are not currently available. Developers with GPU-dependent workloads might need to explore other solutions.
As a result of this, workloads that needs GPU acceleration has to  be run on EC2 instances.


**Portability:** Fargate cannot be used by a users if for instance there is a need for them to move their workloads from one cloud provider to another cloud provider. 

**Not all workloads are supported:** Some workloads that do require high-performance computing or specialized hardware are not by AWS Fargate If you have a workload that requires a lot of resources, such users are better off managing their own servers.


**Lack of image caching:** Image caching is not supported by AWS Fargate and as a result there is longer pod startup times as images are not cached on the node which affects efficiency of work being done.



**USE CASES**
1)AWS Fargate can be used to scale up light workloads which has high traffic during the day and scale down it down at night when the traffic is low to save money for workloads that requires higher infrastructure.
 
2)AWS Fargate is a better choice for running microservices. Developers can deploy each containerized microservice and the required resources will be managed automatically.

3)AWS Fargate can be used for batch processing, such as image and video processing, data analysis and ETL tasks. You can tailor your requirements according to the workload involved.

4)Deploying and running web applications without managing server is easy with Fargate.


5)You can Launch your containers without doing the work of to provisioning or managing EC2 instances using AWS Fargate. If you require large workloads of memory and do not want to make much of the work to manage the server or create one, then  then Fargate is preferred. 

6) AWS Fargate empowers AI the  ML workloads, as well as assists in scaling up the development, deployment, and testing of a user's ML models.