Book Image

Amazon Fargate Quick Start Guide

By : Deepak Vohra
Book Image

Amazon Fargate Quick Start Guide

By: Deepak Vohra

Overview of this book

Amazon Fargate is new launch type for the Amazon Elastic Container Service (ECS). ECS is an AWS service for Docker container orchestration. Docker is the de facto containerization framework and has revolutionized packaging and deployment of software. The introduction of Fargate has made the ECS platform serverless. The book takes you through how Amazon Fargate runs ECS services composed of tasks and Docker containers and exposes the containers to the user. Fargate has simplified the ECS platform. We will learn how Fargate creates an Elastic Network Interface (ENI) for each task and how auto scaling can be enabled for ECS tasks. You will also learn about using an IAM policy to download Docker images and send logs to CloudWatch. Finally, by the end of this book, you will have learned about how to use ECS CLI to create an ECS cluster and deploy tasks with Docker Compose.
Table of Contents (14 chapters)
Title Page
Copyright and Credits
Packt Upsell

Configuring ECS CLI

Configuring the ECS CLI involves the following two configurations:

  • Configure an ECS cluster with the Fargate launch type
  • Configure an ECS CLI profile

Next, we shall discuss each of these configurations. The syntax to configure a cluster is as follows:

ecs-cli configure --cluster cluster_name --default-launch-type launch_type --region region_name --config-name configuration_name

The different command parameters in the ecs-cli configure command are discussed in this table:

Command parameter


Value to set


Name of an existing ECS cluster or a new cluster to create



AWS region



Launch type



Configuration name



  1. Run the following command in PowerShell to configure an ECS cluster:
      ecs-cli configure --cluster hello-world --region us-east-1 --default-
      launch-type FARGATE --config-name hello-world
  1. Create a directory, C:\PowerShell, for PowerShell and run the preceding command from the directory...