Key Concepts Flashcards

1
Q

What is ECS?

A

Elastic container service is a fully managed cloud container orchestration service. It runs multiple containers using EC2 instances OR Fargate

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

ECS Cluster

A

a logical grouping of EC2 instances or Fargate resources are run

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

Task

A

a single instance of running a container or a group of containers that define how a containerized application should be deployed

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

Task Definition

A

a template that describes the source of the application image, resources required in the terms of CPU and memory units container, and host port mapping, and other critical info

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

Why use ECS over EC2?

A

Although from a high level they appear to host workloads and are pretty similar, on a deeper level they are suited for different types of workloads and are different.

ECS (Elastic Container Service):
1. Container Orchestration: Manages and scales containers automatically.
2. Simplified Management: No need to manage underlying EC2 instances if using Fargate.
3. Optimized Scaling: Easily scales containers up or down based on demand.
4. Integration: Built-in support for AWS services (e.g., IAM, CloudWatch).
5. Cost Efficiency: Pay only for resources used (compute & memory), especially with Fargate.

EC2 (Elastic Compute Cloud):
1. Full Control: Offers more flexibility with instance types and configurations.
2. Custom Configurations: Ideal for custom environments that need full OS control.
3. Persistent Workloads: Better suited for applications needing long-running processes or custom networking.

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

Availability Zone (AZ)

A

a distinct location within an AWS Region. Each AWS Region consists of multiple Availability Zones, which are designed to be isolated from failures in other zones. This provides redundancy and fault tolerance.
1. physical locations
2. high availability
3. low latency
4. Redundancy and Disaster Recovery
5. Usage in AWS Services

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

What is an ECS service?

A

A long-running ECS task that can be managed, scaled, and monitored ensuring the desired number of tasks are always running

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

How does ECS manage access control?

A

Through IAM roles and policies

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

Which service integrates with ECS for secrets management?

A

AWS Secrets Manager or Systems Manager Parameter Store for managing sensitive data

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

What is ECR?

A

A fully managed container image registry service that allows you to store, manage, and deploy Docker container images

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

How does ECR integrate with ECS?

A

ECR stores container images that ECS pulls to deploy and run tasks

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

Target group

A

a set of registered targets (ECS tasks) to which a load balancer distributes traffic. It contains health check settings for monitoring targets

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

Load Balancer

A

distributes incoming application traffic across multiple tasks or containers to ensure high availability and reliability

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

Service Directory

A

a feature that enables ECS tasks to automatically register with DNS. This makes it easy to find and connect to tasks across clusters

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

capacity provider

A

defines the infrastructure capacity available for the tasks in your cluster. ECS uses capacity providers to determine where to place tasks

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

IAM Roles for ECS

A
  1. Task Role: Permissions for the tasks to interact with AWS services
  2. Execution Role: Permissions for ECS to pull images, write logs, etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ECS Service Auto Scaling

A

Adjusts the number of tasks in your service based on demand, helping manage scaling automatically

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

Placement Strategies and Contraints

A

Defines rules for task placement, such as balancing tasks across availability zones or restricting placement to specific instances

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

ECS Agent

A

A component that runs on container instances and communicates with ECS API to handle task operations

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

Task Definition Revision

A

Every time a task definition is updated, a new revision is created. ECS uses these revisions to run tasks, so you can revert to previous versions if needed

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

Container Defintion

A

Part of a task definition where that specifies individual container configurations, such as image, port mappings, environment variables, logging, and storage

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

Port Mapping

A

specifies which ports are open to the external network and which are connected to the container within the task definition

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

Environment Variables

A

variables passed to the containers, often used to configure containerized applications, such as database connection strings or API keys

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

Log configuration

A

defines how logs from containers are managed. ECS can send logs to AWS services like CloudWatch or to a local file

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

Volumes

A

Specifies data volumes used by containers, defining where data is stored and shared between containers within the same task

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

Network Mode

A

defines how the container’s networking is configured. Options include bridge, host, awsvpc, and none

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

Task Placement Strategy

A

Rules that determine where tasks s are placed within a cluster, such as binpack, random, or spread strategies for balancing resources

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

Task Placement Contraints

A

Defines specific conditions that must be met for tasks to be placed on container instances, such as instance attributes or availability zones

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

CPU and Memory Reservations and Limits

A

Specifies minimum (reservation) and maximum (limit) CPU and memory resources a container can use, controlling it’s performance

28
Q

Task Lifecycle States

A

States a task be in, such as pending, running, stopping, stopped

29
Q

Desired Count

A

The number of task instances ECS attempts to maintain for a service. Auto scaling adjusts this automatically

30
Q

Service Scheduler

A

A component responsible for managing and scheduling the tasks within a service. Ensures desired count and placement constraints are met

31
Q

Primary and Active Service Deployments

A

In deployments, the primary service is the one actively serving traffic, while active deployments are transition or rolling out

32
Q

Service Discovery Namespace

A

Provides a DNS name for your service, allowing it to be discoverable within a namespace

33
Q

Health Check Grace Period

A

The period to wait after a task starts before checking its health status, allowing time for start up processes

34
Q

Service Event

A

An event related to the service lifecycle, like service updates, task state changes, or scaling activities

35
Q

Elastic Network Interface (ENI)

A

a virtual network interface attached to tasks in awsvpc mode, allowing them to have their own IP addresses within a VPC

36
Q

ECS Service Security Groups

A

Controls inbound and outbound traffic for tasks, applied at the network interface level

37
Q

Elastic Load Balancing Health Checks

A

Checks the health of tasks behind a load balancer. Tasks that fail health checks are automatically terminated and replaced

38
Q

Task Role Policy

A

A specific IAM policy attached to a task role that defines what resources and actions the tasks can access

39
Q

CloudWatch Alarms for ECS

A

Monitors the performance of tasks and services, triggering actions based on conditions like CPU usage or task count

40
Q

Autoscaling Policies for ECS Services

A

Policies that define scaling thresholds for services, such as scaling up when CPU usage exceeds a certain percentage

41
Q

Subnet

A

a segment within a VPC that divides the IP address range into smaller, manageable segments, allowing for organized resource isolation

42
Q

What are the two main types of subnets in ECS?

A
  1. Private- are not directly accessible and usually access the internet through a NAT Gateway
  2. Public- accessible from the internet
43
Q

What is a NAT Gateway?

A

A managed service that allows instances in private subnets to connect to the internet or AWS services for outbound traffic, while blocking inbound internet connections for added security

44
Q

What is the purpose of subnets in ECS task networking?

A

Subnets define where the task run within a VPC, determining their network reachability and security level (internet access or internal only)

45
Q

How do you specify subnets for ECS tasks?

A

You assign subnets to tasks in the networking configuration of a task or service determining if they are public or private subnets

46
Q

Why are security groups important in subnet configuration?

A

Security groups act as virtual firewalls, defining inbound and outbound rules for tasks in awsvpc mode, providing another layer of security in addition to subnet ACLs

47
Q

Why should ECS tasks be deployed across multiple subnets in different Availability Zones?

A

To ensure high availability and redundancy, as this setup provides fault tolerance in case one availability zone goes down

48
Q

How does subnet selection affect load balance placement in ECS?

A

For public-facing services, load balancers should be in public subnets, for internal services, load balancers can be in private subnets

49
Q

What is the advantage of enabling IPv4 and IPv6 for ECS subnets

A

Dual-stack networking allows tasks to support both IPv4 and IPv6, accommodating modern internet protocol standards and expanding address availability

50
Q

How do VPC peering and subnets interact?

A

Subnets within peered VPCs can communicate based on route table configurations, enabling ECS tasks to access resources across VPCs

51
Q

What role do route tables play in subnet configuration?

A

Route tables define traffic routes for subnets, directing traffic within the VPC or to external resources like the internet via an Internet Gateway

52
Q

What is VPC Peering in AWS?

A

A network connection between 2 VPCs that enable them to route traffic between each other privately, as if they were within the same network. It allows resources in different VPCs to communicate without using the internet

53
Q

What is route configuration in aws?

A

Involves setting rules within a route table that specify how traffic is directed within a VPC, including routes to subnets, internet gateways, NAT gateways, and other VPCs

54
Q

what is an Elastic Network Interface?

A

a virtual network interface that can be attached to tasks in awsvpc networking mode, providing network connectivity and flexible IP configurations

55
Q

What are ECS Placement Constraints?

A

Rules that limit task placement based on factors like instance attributes or availability zones, ensuring tasks run on appropriate resources

56
Q

What is the service scheduler in ECS?

A

Responsible for managing task placement and maintaining the desired count of tasks for service, ensuring they remain running and healthy

57
Q

what are task environment variables in ECS?

A

user-defined variables that can be passed to containers within a task, allowing configuration customization for different environments

58
Q

What is a FireLens Log Router in ECS?

A

A log router that enables advanced log forwarding capabilities for ECS tasks, allowing logs to be sent to multiple destinations, including S3, CloudWatch, and third-party logging service

59
Q

What is an ECS Deployment Controller?

A

Manages how service updates are deployed, with options like rolling update (default) and blue/green deployments for updating containers with minimal downtime

60
Q

What is ECS Anywhere feature?

A

allows you to run and manage ECS tasks on non-aws infrastructure, including on-premises servers and other cloud providers, extending ECS management capabilities beyond aws

61
Q

Target Group

A

a logical grouping of ECS tasks that a load balancer directs traffic to. Each task within a service is registered as a target in the target group

62
Q

Load Balancer Listener

A

a process that checks for connection requests on a specified protocol and port, directing traffic to registered targets based on listener rules

63
Q

What is blue/green deployment in ECS?

A

A release strategy that allows you to deploy a new version of service(green), alongside the current version(blue), switching traffic only once the new version is confirmed to be working

64
Q

What is the primary benefit of blue/green deployment?

A

It minimizes downtime and reduces risk by allowing testing of the new version in production before fully switching traffic from the old version, enabling quick rollback if need be

65
Q

How does traffic shifting work in blue/green deployment?

A

Traffic is gradually or immediately redirected from the blue environment to the green environment through a load balancer, allowing a controlled transition

66
Q

What is the role of target groups in blue/green deployment?

A

First target group is for the blue environment and the second for the green environment. Traffic is directed to the appropriate target group based on deployment status

67
Q

What is Amazon Route 53?

A

Amazon Route 53 is a scalable and highly available Domain Name System (DNS) web service that provides domain registration, DNS management, and health checking, allowing routing of end-user requests to AWS services and external resources.

68
Q

What are the key features of Amazon Route 53?

A

Domain Registration: Purchase and manage domain names.
DNS Management: Route traffic to AWS services and external endpoints.
Health Checks: Monitor the health of resources and route traffic accordingly.
Traffic Routing: Supports various routing policies (e.g., simple, failover, geolocation, etc.).
Highly Scalable and Available: Ensures quick and reliable DNS resolution for global traffic.

69
Q

What is the role of DNS in AWS ECS?

A

Service Discovery: Allows containers to discover and communicate using service names.
Amazon Route 53 Private DNS: Provides private DNS resolution for ECS services within a VPC.
Internal Load Balancing: Routes traffic using the DNS of Application Load Balancers (ALBs) or Network Load Balancers (NLBs).
Networking Mode (awsvpc): Provides DNS names for tasks to communicate using ENIs and private IPs.
External Communication: Resolves external domain names for internet access.