Amazon Fargate Quick Start Guide

Book description

This book gets you started and gives you knowledge about AWS Fargate in order to successfully incorporate it in your ECS container application.

Key Features

  • Gives you a quick walk-through over the Amazon Elastic Container Services (ECS)
  • Provides an in depth knowledge of the components that Amazon Fargate has to offer.
  • Learn the practical aspects of Docker application development with a managed service

Book Description

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.

What you will learn

  • Running Docker containers with a managed service
  • Use Amazon ECS in Fargate launch mode
  • Configure CloudWatch Logging with Fargate
  • Use an IAM Role with Fargate
  • Understand how ECS CLI is used with Fargate
  • Learn how to use an Application Load Balancer with Fargate
  • Learn about Auto Scaling with Fargate

Who this book is for

This book is for Docker users and developers who want to learn about the Fargate platform. Typical job roles for which the book is suitable are DevOps Architect, Docker Engineer, and AWS Cloud Engineer. Prior knowledge of AWS and ECS is helpful but not mandatory.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Amazon Fargate Quick Start Guide
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Getting Started with Amazon ECS and Amazon Fargate
    1. What Amazon Fargate is
    2. Benefits of Fargate
    3.  Amazon ECS objects
    4. Compute resources in Amazon ECS Fargate
    5. What is new in the Amazon Fargate launch type mode?
    6. Summary
  7. Networking
    1. Creating an ECS cluster and service
      1. Configuring a Container definition
      2. Configuring a Task definition
      3. Configuring a service
      4. Configuring and creating a cluster
    2. Running additional tasks
    3. Accessing the service
    4. Deleting a cluster
    5. Summary
  8. Using CloudWatch Logs
    1. Overview of CloudWatch Logs and aws log driver
    2. Creating an ECS service for MySQL database
    3. Configuring a Container definition
    4. Configuring logging
    5. Configuring a Task definition
    6. Configuring a service
    7. Configuring a cluster
    8. Creating an ECS service
    9. Exploring Task logs
    10. Exploring CloudWatch Logs
    11. Exploring CloudWatch metrics
    12. Summary
  9. Using Auto Scaling
    1. Creating an ECS service for a Hello world application
    2. Types of auto scaling
      1. Target tracking scaling policies
      2. Step scaling policies
    3. Configuring an auto scaling policy
      1. Defining the range of tasks
      2. Adding an auto scaling policy
      3. Adding a step scaling policy
      4. Creating a CloudWatch alarm
      5. Configuring a scaling action
    4. Demonstrating the use of auto scaling
    5. Exploring CloudWatch metrics and Logs
    6. Updating auto scaling policy 
    7. Summary
  10. Using IAM
    1. Creating an IAM user
    2. Adding a custom policy for Elastic Load Balancing
    3. Logging in as the IAM user
    4. Summary
  11. Using an Application Load Balancer
    1. Creating an application load balancer
    2. Creating a task definition
    3. Creating a service
    4. Configuring an application load balancer
    5. Invoking the Hello World application
    6. Stopping tasks and deleting a load balancer
    7. Summary
  12. Using Amazon ECS CLI
    1. Setting up the environment
    2. Installing ECS CLI
    3. Installing AWS Tools for Windows PowerShell
    4. Configuring ECS CLI
      1. Setting up a CLI profile
    5. Setting up prerequisites for Fargate
    6. Registering the task execution policy
    7. Creating an ECS cluster
    8. Creating a security group
    9. Granting security group Ingress
    10. Creating a compose file
    11. Configuring ECS specific parameters
    12. Deploying the compose file to the cluster
    13. Listing the running containers on the cluster
    14. Listing the container logs
    15. Scaling the tasks on the cluster
    16. Accessing the WordPress service
    17. Deleting the service and the cluster
    18. Summary
  13. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Amazon Fargate Quick Start Guide
  • Author(s): Deepak Vohra
  • Release date: July 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789345018