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

Updating auto scaling policy 

The auto scaling policy only scales the number of running (desired) tasks and does not modify the auto scaling policy, which is still set to a range of 1-5 tasks. The service may be updated to modify any or all of the minimum number of tasks, desired count, maximum number of tasks, and scaling action for auto scaling. In this section, we shall discuss updating the auto scaling configuration:

  • Click on Update for the service as before. The Desired number of tasks is set to 5, as shown here, when auto scaling is performed:
  • Reduce the Desired number of tasks to 3, as shown here
  • To modify the scaling policy, click on the AutoScaler link, as shown here:
  • In Edit policy, select Use an existing policy and select the AutoScaleBasedOnCPUUtilization policy. The scaling action does not have to be performed when the alarm threshold is breached. Modify the scaling action to Add1tasks when 0.9<=CPUUtilization, as shown here. The alarm threshold is CPUUtilization> 0.1 for...