Section 10: Docker Containers and ECS Flashcards

1
Q

What is Amazon ECS (Elastic Container Services)?

A

Amazon Elastic Container Service (ECS) is a fully managed container orchestration service that helps you to more efficiently deploy, manage, and scale containerized applications.

Orchestrates containers such as Docker containers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ECS components

A

Elastic Containter Service components:
* Cluster - logical group of EC2 instances
* Container instance - EC2 instance running on ECS agent
* Task Definition - blueprint that describes how a docker container should launch
* Task - a running container using settings in a Task Definition
* Service - defines long running tasks (Can control task count with Auto Sacling and attach an ELB)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ECS key features

A
  • serverless with AWS Fargate
  • fully managed container orchestration
  • docker support
  • Windows container support
  • Elastic Load Balancing integration
  • Amazon ECS Anywhere
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Control Plane?

A

Control planes provide the administrative APIs used to create, read/describe, update, delete, and list (CRUDL) resources.

For example, the following are all control plane actions: launching a new Amazon Elastic Compute Cloud (Amazon EC2) instance, creating an Amazon Simple Storage Service (Amazon S3) bucket, and describing an Amazon Simple Queue Service (Amazon SQS) queue. When you launch an EC2 instance, the control plane has to perform multiple tasks like finding a physical host with capacity, allocating the network interface(s), preparing an Amazon Elastic Block Store (Amazon EBS) volume, generating IAM credentials, adding the Security Group rules, and more. Control planes tend to be complicated orchestration and aggregation systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is AWS Fargate?

A

AWS Fargate is a technology that you can use with Amazon Elastic Container Service (ECS) to run containers without having to manage servers or clusters of Amazon EC2 instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EC2 vs Fargate launch types

A

Fargate - You can use the Fargate launch type to run your containerized applications without the need of provisioning and managing the underlying infrastructure. AWS Fargate is the serverless way to host your Amazon ECS workloads.

EC2 - The EC2 launch type is suitable for large workloads that must be price optimized.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Auto Scaling for ECS

A

Elastic Container Service scaling types:

  • Service auto scaling - automatically adjust the desired task count up/down using the Application Auto Scaling service. Supports target tracking, step and scheduled scaling policies
  • ** Cluster auto scaling** - uses a Capacity Provider to scale the number of EC2 cluster instances using EC2 Auto Scaling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Network Address Translation (NAT) Gateway with ECS

A

NAT Gateway is required for tasks in private subnets to access the internet.

Containers and all connections to web services coming into HTTP listener use port 80

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Amazon Elastic Kubernetes Service (EKS)

A

Amazon EKS is a managed service for running Kubernetes applications in the cloud or on-premise.

Kubernetes is an open-source system for automating deployment, scailing and management of containerised applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Amazon Elastic Kubernets Service features

A

EKS features:
* Hybrid deployment - manage Kubernetes clusters and applications across hybrid environments (AWS & on-premise)
* Batch processing - run sequential or parrallel batch workloads on your EKS cluster using Kubernetes Jobs API. Plan, schedule and exuecude batch workloads
* Machine learning - use Kubeflow with EKS to model matching leaning workflows
* Web applications - build web apps that automatically scale up/down and run in highly available configuration across multiple Availability Zones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

More about EKS

A

Elastic Kubernetes Service
* supports load balancing with Application Load Balancer, Network Load Balancer, Classic Load Balancer
* runs on EC2 / Fargate and also AWS Outposts
* groups of containers are known as Pods in Kubernetes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

EKS auto scaling

A

Elastic Kubernetes Service - auto scaling

  • Cluster auto scaling:
    • vertical pod autoscaler (adjusts CPU and memory)
    • horizontal pod scaler (scales number of pods)
  • Workload auto scaling:
    • EKS support two autoscaling products
      • Kubernetes cluster autoscaler
      • Karpenter open source autoscaling project

Cluster autoscaler uses AWS scaling groups, Karpenets works directly with EC2 fleet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is AWS Outposts

A

AWS Outposts is a fully managed service that extends AWS infrastructure, services, APIs, and tools to customer premises. By providing local access to AWS managed infrastructure, AWS Outposts enables customers to build and run applications on premises using the same programming interfaces as in AWS Regions, while using local compute and storage resources for lower latency and local data processing needs.

An Outpost is a pool of AWS compute and storage capacity deployed at a customer site. AWS operates, monitors, and manages this capacity as part of an AWS Region. You can create subnets on your Outpost and specify them when you create AWS resources such as EC2 instances, EBS volumes, ECS clusters, and RDS instances. Instances in Outpost subnets communicate with other instances in the AWS Region using private IP addresses, all within the same VPC.

https://docs.aws.amazon.com/outposts/latest/userguide/what-is-outposts.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Amazon Elastic Containere Registry (ECR)

A

Amazon Elastic Container Registry (ECR):
* full-managed container registry
* integratied with Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS)
* Can use Docker tools and Docker CLI
* supports Open Container Registry (OCI) and Docker Registry
* can be accessed from any Docker environment in the cloud, on-premise or your local machine
* container images and artifacts are stored in S3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is AWS App Runner?

A

AWS App Runner is a fully managed service for deploying containerised web apps and APIs.

It is a Paas solution with all components managed, just bring your code and container image.

Is similar to Elastic Beanstalk, however App Runner focuses mainly on web apps and API’s which must be containerised.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can auto scaling be implemented for the ECS cluster instances?

A

Using a Capacity Provider that is associated with an Auto Scailing Group (ASG).

17
Q

Using which component can you enable auto scaling for ECS containers?

A

Service

A service is used to provide auto scaling for ECS tasks.

18
Q

The development department in your organization need to quickly access a platform for running Docker containers. The platform service should be fully managed. Which AWS service should you provision for them?

A

Amazing Elastic Container Services (ECS) with a Fargate launch type

The Fargate launch type is a fully managed service.

19
Q

Which of the following is NOT a key feature of Amazon ECS?

A

Serverless with EC2 (Elastic Compute Cloud)

Amazon EC2 is the AWS service for provisioning servers/instances and therefore cannot by definition be serverless

20
Q

ECS and EKS cheatsheet

A

https://digitalcloud.training/amazon-ecs-and-eks/