Amazon Fargate Quick Start Guide
eBook - ePub

Amazon Fargate Quick Start Guide

Learn how to use AWS Fargate to run containers with ease

  1. 190 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Amazon Fargate Quick Start Guide

Learn how to use AWS Fargate to run containers with ease

About this book

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.

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Year
2018
Print ISBN
9781789345018
Edition
1
eBook ISBN
9781789340051

Using an Application Load Balancer

While some Docker containers accept TCP client requests, other Docker containers accept client requests on an HTTP path. As demonstrated in Chapter 2, Networking, an HTTP request to a Hello World application task could be made on the public IP address exposed by the Hello World task. An ECS service includes built-in internal load balancing to distribute client traffic between the tasks in a service.
Problem : Each task in an ECS service with Fargate launch is associated with an ENI and a public IP. When an application is scaled up to run multiple tasks, multiple ENIs are created, and each task must be accessed on its public IP address.
Although internal load balancing is provided, no provision is included to balance client traffic externally between the different tasks' IP addresses. A single task could receive an inordinate number of client requests, while another task could receive relatively fewer client requests, or even none, which would result in an imbalance in the routing of the external client load, as illustrated in the following diagram. If the task (or tasks) to which the client load is directed fails, the application fails to serve any client requests. High availability of an ECS hosted application is not provided. Exposing containers directly to the public is not the best security practice.
It is always recommended to put them behind an ELB to allow network traffic control in terms of security.
Solution: With an HTTP protocol application such as the Hello World application, an EC2 Application Load Balancer may be used to route HTTP client requests to the different tasks in an ECS service. An Application Load Balancer is an external load balancer that exposes a public DNS, and all client requests are directed to the single public DNS. The Application Load Balancer balances the client load between the application's tasks, providing the high availability of an ECS-hosted application as a result, as illustrated in the following diagram. Even if one of the tasks were to fail, the Application Load Balancer would direct the client traffic to tasks that are still available:
In this chapter, we will learn about the following:
  • Creating an application load balancer
  • Creating a task definition
  • Creating a service
  • Configuring an application load balancer
  • Invoking the Hello World application
  • Stopping tasks and deleting a load balancer
The only prerequisite is having an AWS account.

Creating an application load balancer

The following procedure is used to configure a Fargate ECS service with an application load Balancer:
  1. Create an application load balancer
  2. Create a task definition
  1. Create a service
  2. Configure the application...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Getting Started with Amazon ECS and Amazon Fargate
  7. Networking
  8. Using CloudWatch Logs
  9. Using Auto Scaling
  10. Using IAM
  11. Using an Application Load Balancer
  12. Using Amazon ECS CLI
  13. Other Books You May Enjoy

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Amazon Fargate Quick Start Guide by Deepak Vohra in PDF and/or ePUB format, as well as other popular books in Computer Science & Cloud Computing. We have over 1.5 million books available in our catalogue for you to explore.