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

Exploring CloudWatch metrics and Logs


In this section, we shall explore the CloudWatch metrics and logs generated by the ECS service and find log events for the CloudWatch alarm threshold being exceeded:

  • Open the CloudWatch console as shown here. The alarm summary for the AutoScaleCPUUtilization gets displayed in a graph.
  • Click on Browse Metrics to browse metrics:
  • Select Alarms in the margin. The AutoScaleBasedOnCPUUtilization alarm used as a threshold for auto scaling gets listed, as shown in the following screenshot. The alarm state is ALARM when the alarm threshold is exceeded.

The AutoScaleBasedOnCPUUtilization alarm details and graph get displayed. The two spikes in CPU utilization in the graph indicate that the alarm threshold has been exceeded, which applies the auto scaling to add one task each time the alarm threshold is exceeded. The first spike in the graph is for when the load is increased slightly, and the second spike is for when the load is increased to a greater extent:

  • When the...