How to Deploy AWS Elastic Container Service using Fargate

blur business close up code
Reading Time: 3 minutes

Hello Readers! In this blog let’s see how to deploy and run your docker container in AWS Elastic Container service(ECS) in AWS using the launch type fargate.

What is Elastic Container Service(ECS) ?

Amazon Elastic Container Service (ECS) is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon Elastic Compute Cloud (Amazon EC2) instances.

First, you need to know what is Docker?

  • Docker is an existing tool that developers can use to launch containers and their container instances are isolate.
  • This means that the ECS is on top of Docker, so you can start setup and monitor Docker containers on your ECS cluster.

What is AWS Fargate?

  • AWS Fargate is a service that allows users to run containers on Amazon’s cloud computing platform without having to manage the underlying infrastructure.
    Fargate is an operational mode within Amazon Elastic Container Service (ECS) that abstracts container-hosted clusters and servers from users of the service.
  • With Fargate, users retain control at the container level, but do not need to set up or configure anything further down the infrastructure stack, such as: VM instance.

Let’s get start,
Step 1: Before you can start, you must first sign in to the AWS Management Console. So if you don’t already have an AWS account, create one. Then sign in to your AWS account and click the Services -> Select Elastic Container Service (ECS).

Step 2: So, the first things to do is Click on the ECS -> Get Started

Components:

Container Definition:

Container definitions describe the various containers used in task definitions that are launched as part of a task.

Task Definition:

A task definition is a text file that describes one or more containers that form your application. It`s in JSON format. You can use it to describe up to a maximum of ten containers. The task definition functions as a blueprint for your application. It specifies the various parameters for your application.

Task:

A task is an instantiation of a task definition in a cluster. After you create a task definition for your application in Amazon ECS, you can specify the number of tasks that you want to perform in your cluster. You can run the task as a standalone task or as part of a service.

Service:

You can use Amazon ECS services to simultaneously perform and manage as many tasks as you need in your Amazon ECS cluster. If one of the tasks fails or stops for some reason, the Amazon ECS service scheduler starts another instance based on the task definition. It does this to replace it, thereby maintaining the desired number of missions.

Cluster:

An Amazon ECS cluster is a logical grouping of tasks or services. You can use clusters to isolate applications. If the task runs on Fargate, the cluster resources are also managed by Fargate.

Conclusion:

So, In this blog we have seen in some simple steps how we can deploy docker container in AWS Elastic Container service(ECS) in AWS using the launch type fargate .Thanks for being with me till the end. If you find this blog helpful do share with your friends.

knoldus

Written by 

Ashi Dubey is a Software Intern at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is Devops. When not working, you will find her with a Book.