Skip to main content

Amazon ECS Deep Dive

Course

Intro Video

Photo of Mark Richman

Mark Richman

AWS Training Architect II in Content

Length

11:39:52

Difficulty

Intermediate

Videos

41

Hands-on Labs

9

Course Details

This course will explore Amazon Elastic Container Service (ECS) from the very basics of its configuration to an in-depth review of its use cases and advanced features. We will talk about how ECS is architected in order to provide a better understanding of how to manage container-based applications at scale. Once we have a solid foundation of the basics, we will dive into the advanced use cases to uncover the power of ECS.

Access The ECS Captain's Log: https://interactive.linuxacademy.com/diagrams/ECSCaptainsLog.html

Join the Linux Academy community slack for chat here: https://inuxacademy-community-slack.herokuapp.com/ and join the #containers channel.

Syllabus

Course Introduction

Getting Started

Course Introduction

00:00:59

Lesson Description:

If you're wondering whether this course is for you and what you need to know before taking it, then look no further. This video describes the intended audience, pre-requisites, and gives a brief overview of the concepts covered throughout this course. This course will explore Amazon Elastic Container Service (ECS) from the very basics of its configuration to an in-depth review of its use cases and advanced features. We will talk about how ECS is architected to provide a better understanding of how to manage container-based applications at scale. Once we have a solid foundation of the basics, we will dive into the advanced use cases to uncover the power of ECS. Join the Linux Academy community slack for chat here and join the #containers channel.

About the Training Architect

00:00:58

Lesson Description:

Get to know a little bit about me, the author!

Working with the Interactive Diagram

00:01:46

Lesson Description:

The Interactive Diagram for this course is a tool to provide both an overview and a detailed breakdown of all the ECS components covered. You'll see it incorporated throughout the course and, in this lesson, you'll learn how you can also use it independently to fortify your understanding of ECS. LINK: ECS Captain's Log

Course Prerequisites

00:01:05

Lesson Description:

This hands-on ECS Deep Dive course is great for those new to ECS or those who want to expand what they already know. However, you should have some prerequisite knowledge before considering this course as we will be getting our hands dirty with the AWS Management Console, Linux command line, Docker, and modifying configuration files with YAML and JSON. If you're a bit rusty or inexperienced in any of these areas, then it may behoove you to freshen up a bit before jumping into this course.

AWS Free Tier: Usage Tracking and Billing Widget

00:03:56

Lesson Description:

This video gives you a walkthrough on how to use the AWS Free Tier Tracking and Billing Widget for you own AWS Account!

Exploring ECS

Overview

Section Introduction

00:01:41

Lesson Description:

This video lesson discusses what we plan on covering within the next few videos. We will discuss many different fundamental concepts that are critical to understanding Amazon ECS.

What is Amazon ECS?

00:06:30

Lesson Description:

Before we start learning about ECS, it's important that we have an understanding of its history, goal, and use cases.

Examining ECS Capabilities

00:06:56

Lesson Description:

Container technology has reshaped the way people think about developing, deploying, and maintaining software. This has given rise to the need for container orchestration. This lecture introduces the student to container orchestration concepts, and how ECS delivers on its promise.

Understanding Costs

00:07:27

Lesson Description:

ECS itself it free to use; however, you pay for the underlying resources you consume. There are two different pricing models for ECS: Fargate and EC2. This lecture explains each model in detail.

ECS Use Cases

00:02:53

Lesson Description:

This lecture details some use cases for ECS, specifically microservices and batch jobs.

ECS vs. Other Services

00:06:55

Lesson Description:

This lecture compares and contrasts ECS with other container orchestration technologies, such as Kubernetes and even AWS's own Elastic Beanstalk.

Section Conclusion and Summary

00:01:58

Lesson Description:

Let's wrap up this section and review what we covered!

ECS Architecture

How ECS Works

Section Introduction

00:01:16

Lesson Description:

This video lesson discusses what we plan on covering within the next few videos. We will discuss fundamental architectural concepts that are critical to understanding Amazon ECS.

Container Agent

00:08:53

Lesson Description:

The Amazon ECS container agent allows container instances to connect to your cluster. This lecture explains how the agent works, and how to install and configure it on non-ECS optimized AMIs.

Creating a Cluster

00:11:30

Lesson Description:

When you first use Amazon ECS, a default cluster is created for you, but you can create multiple clusters in an account to keep your resources separate. This lecture explains how to create a cluster from scratch using the AWS Management Console as well as the AWS CLI.

Task Definitions

00:15:38

Lesson Description:

A task definition is required to run Docker containers in Amazon ECS. This lecture details all the parameters you can specify when defining a task. We also explain the awslogs log driver, which sends log information to CloudWatch. CloudWatch integration is covered in more detail in a later lecture.

Scheduling Tasks

00:11:23

Lesson Description:

This lecture details the ECS scheduler, which provides for management of both long-running services as well as manual tasks (i.e., batch jobs). We'll also discuss the various algorithms you can use in ECS to schedule tasks across a cluster.

Working with Services

00:15:25

Lesson Description:

ECS allows multiple tasks to be composed into services. This lecture covers service scheduler concepts, and how to create a service in detail, including the various definition parameters and networking options.

Load Balancing

00:08:39

Lesson Description:

This lecture details how ECS can be configured to use Application Load Balancing to distribute traffic across the tasks in your service.

Autoscaling

00:06:01

Lesson Description:

This lecture details how ECS can be configured to use Service Auto Scaling to adjust its desired task count up or down in response to CloudWatch alarms.

Understanding Elastic Container Registry (ECR)

00:13:18

Lesson Description:

Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. This lecture details how ECR is integrated with ECS, simplifying the development to production workflow.

Section Conclusion and Summary

00:02:33

Lesson Description:

This video is the section conclusion and summary for the ECS Architecture video section.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Containerizing an Application

Migrating to Containers

Section Introduction

00:01:24

Lesson Description:

During this Containerizing an Application section, we're going to walk through a sample application, from architecture, to implementation, and then to publication into ECR. These steps will prepare us to deploy the sample application to a production ECS cluster.

Understanding the Application Architecture

00:04:41

Lesson Description:

This lecture details the sample application architecture, and how it's composed of a web front-end and two utility microservices, including integration points with AWS. This lecture includes a walkthrough of the architecture diagram.

Building from Source

00:10:07

Lesson Description:

This lecture explains how to install and configure all the prerequisites necessary to build our sample application from source code. To install on Amazon Linux 2:

sudo yum update

sudo yum install docker

sudo service docker start
sudo usermod -a -G docker $USER

# log out and back in

# set up Node.js https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash

. ~/.nvm/nvm.sh

nvm install 6

node -e "console.log('Running Node.js ' + process.version)"

sudo amazon-linux-extras install golang1.11

go version

git clone https://github.com/linuxacademy/ecs-deep-dive-2018

cd ecs-deep-dive-2018/picture-upload/

make install

# You will see some warnings about `SKIPPING OPTIONAL DEPENDENCY` and deprecated modules. These can be safely ignored.

# Install docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

# make sure you're in ~/ecs-deep-dive-2018/picture-upload

# edit docker-compose.yml, setting the AWS_ACCESS_KEY_ID, AWS_REGION, and AWS_SECRET_ACCESS_KEY values 

docker-compose up

Creating a Container Image

00:05:56

Lesson Description:

This lecture walks through the creation of a Dockerfile for one of the microservices in our sample application. We then create a multi-stage build definition to minimize our image size and dependencies.

Publishing to ECR

00:05:05

Lesson Description:

This lecture explains how to create an ECR repository, how to tag an image, and how to push a local Docker image to ECR for later use by ECS.

Section Conclusion and Summary

00:01:43

Lesson Description:

Let's wrap up this section and review what we covered!

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

ECS in Production

Going Live

Deploying to an EC2 Cluster

00:10:09

Lesson Description:

This lecture details how to deploy our sample microservices-based application to an ECS cluster using EC2 instances. Github repository for this lesson https://github.com/linuxacademy/ecs-deep-dive-2018/tree/master/cloudformation CloudFormation Template https://s3.amazonaws.com/ecsdeepdive2018/cloudformation/master.yaml

Deploying with Fargate

00:07:01

Lesson Description:

This lecture details how to deploy a service to an ECS cluster using Fargate, and how Fargate deployments differ from those using EC2.

Deploying to ECS from the CLI

00:07:35

Lesson Description:

This lecture details how to create and manage tasks and services from the AWS Command Line Interface.

CloudWatch Monitoring for Containers

00:06:35

Lesson Description:

You can monitor ECS resources using CloudWatch, which collects and processes raw data from ECS into readable, near real-time metrics. This lecture explains the various metrics available. This lecture also covers CloudWatch logs, and how container instances can log to CloudWatch.

Updating in Production

00:06:05

Lesson Description:

This section covers how to update applications in ECS once they have been deployed into production.

Automating with the CLI

00:04:14

Lesson Description:

Following the previous lecture, this lesson details automating the update of a production-deployed ECS application stack.

Configuring Autoscaling

00:08:25

Lesson Description:

This lecture covers how to achieve high availability using Autoscaling. In this video, we will stress an ECS service, demonstrating how CPU metrics can be used to trigger autoscaling.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

ECS Design Patterns & Practices

ECS in the Real World

Batch Processing

00:05:46

Lesson Description:

Batch processing is useful to analyze large amounts of data. This lecture explains how ECS can effectively manage batch processing, integrating with other AWS services, such as SQS and CloudWatch. This lecture also touches on using spot instances to maximize costs savings.

CI/CD Integration

00:09:20

Lesson Description:

This lecture explains how to integrate ECS into a Continuous Integration/Continuous Deployment (CI/CD) pipeline. We will cover CodePipeline, CodeBuild, and CloudFormation.

Using Parameter Store and IAM Roles

00:09:49

Lesson Description:

Applications deployed into ECS need to securely access credentials and other sensitive data. This lecture details how to use Parameter Store in combination with IAM Roles to effectively secure database credentials.

Automating Container Instance Draining

00:04:54

Lesson Description:

System updates or autoscaling often require ECS cluster nodes to come offline. In this lecture, we demonstrate how container instance draining enables you to remove a container instance from a cluster without impacting tasks in your cluster.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Conclusion

Final Steps

What's Next?

00:02:02

Lesson Description:

Congratulations! If you've made it this far, then you have successfully completed the ECS Deep Dive course. In this video, I want to thank you for spending your valuable time taking my course, and recommend other courses here at Linux Academy that complement what you learned throughout this course.

Get Recognized

00:01:01

Lesson Description:

Now that you have completed the coruse - take the time to share your success and get recognized in our community and LinkedIn.

Take this course and learn a new skill today.

Transform your learning with our all access plan.

Start 7-Day Free Trial