ECS Flashcards
What is ECR?
Elastic Container Registry
What does ECR do?
It stores all private Docker images
What are the 3 choices for a container management platform?
- ECS
- FarGate
- EKS for Kubernetes
How does an EC2 instance get added to an ECS cluster?
The instance runs the ECS Agent, which registers it with the cluster
What is an ECS Task Definition?
It is a JSON file that tells ECS how to run a Docker container
What 5 main aspects does a Task Definition include?
- Image Name
- Port Binding for container host
- Memory and CPU required
- Environment variables
- Networking information
How do you retrieve the login command to use to authenticate your Docker client to your registry in ECR?
run: $(aws ecr get-login –no-include-email –region us-east-1)
What command do you use to build your Docker image?
docker build -t
What command do you run after the build completes?
The tag command: docker tag : /::
docker tag demo:latest 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest
What command will push the image?
docker push 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest
What command will pull the image locally?
docker pull 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest
What are the 3 flavors of ECS and what do they do?
- ECS Classic allows you to provisionEC2 instances to run your container on
- Fargate which is Serverless ECS
- EKS which is managed Kubernetes by AWS
What are 5 characteristics of ECS Classic?
- EC2 instances must be created
- We must configure file /etc/ecs/ecs.config with the cluster name
- The EC2 instance must run the ECS Agent
- EC2 instances can run multiple containers
- ECS tasks can have IAM roles to execute actions against AWS services
What 3 things are required for an EC2 instance to run multiple containers?
- You must not select a host port, only a container port
- You should use an ALB with dynamic ort mapping
- The EC2 instance security group must allow traffic from the ALB on all ports
For ECS Classic, what level does a security group operate at?
Instance level, not task level