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
Contributors
Preface
Index

Chapter 7. Using Amazon ECS CLI

Amazon ECS Command Line Interface (CLI) is a command-line tool used to create, update, and monitor ECS clusters and tasks. Amazon ECS CLI supports the Fargate launch type. To create a container application with ECS CLI, Docker Compose (v1 or v2) is required. In this chapter, we shall use ECS CLI to launch an ECS cluster of the Fargate launch type in Windows PowerShell.

In this chapter, we will learn about the following:

  • Setting up the environment
  • Installing ECS CLI
  • Installing AWS Tools for Windows PowerShell
  • Configuring ECS CLI
  • Setting up prerequisites for Fargate
  • Registering the task execution policy
  • Creating an ECS cluster
  • Creating a security group
  • Granting security group ingress
  • Creating a compose file
  • Configuring ECS specific parameters
  • Deploying the compose file to the cluster
  • Listing the running containers on the cluster
  • Listing the container logs
  • Scaling the tasks on the cluster
  • Accessing the WordPress service
  • Deleting the service and the cluster