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

Configuring an auto scaling policy


Auto scaling is not configured by default:

  • To configure auto scaling, click on the Update button, which is shown in the preceding screenshot, for the service that is to be auto scaled. The Update Service wizard gets started, as shown in the following screenshot. 
  • In the Configure service page, the settings are not to be modified unless the Desired number of tasks (3) needs to be updated. Click on Next step.
  • In Configure network, we don't need to make any modifications. Click on Next step.
  • In the Service auto scaling page, select the Service auto scaling option Configure Service auto scaling to adjust your service’s desired count, as shown here:

We shall discuss configuring a step auto scaling policy next. Configuring step auto scaling involves the following sequence:

  1. Define the range for the number of tasks within which the cluster is to be scaled
  2. Add an auto scaling policy
  3. Define a CloudWatch alarm as a threshold to apply the scaling policy
  4. Define a scaling action...