AWS DevOps Container Services 4 — Questions and Answers
Question 1: Which AWS service provides a managed Kubernetes experience and handles control plane upgrades and patching automatically?
- Amazon ECS
- Amazon EKS (Correct answer)
- AWS Fargate
- AWS Batch
Correct answer: Amazon EKS
Amazon EKS is a fully managed Kubernetes service where AWS operates and upgrades the control plane, including API servers and etcd.
Question 2: A CI/CD pipeline builds a Docker image and must push it to ECR. After running 'docker build', what is the correct sequence of AWS CLI steps?
- docker tag → docker push → aws ecr get-login-password
- aws ecr get-login-password | docker login → docker tag → docker push (Correct answer)
- docker push → aws ecr create-repository → docker tag
- aws ecr create-repository → docker push → docker tag
Correct answer: aws ecr get-login-password | docker login → docker tag → docker push
You must authenticate Docker to ECR using get-login-password piped to docker login, then tag the image with the ECR URI, then push it.
Question 3: What is the function of a Kubernetes Ingress resource in an EKS cluster?
- It defines CPU and memory resource limits for pods
- It manages external HTTP/HTTPS access to services within the cluster (Correct answer)
- It stores environment variables for pod containers
- It schedules pods onto specific nodes
Correct answer: It manages external HTTP/HTTPS access to services within the cluster
An Ingress resource configures an Ingress controller (e.g., AWS Load Balancer Controller) to route external HTTP/HTTPS traffic to internal Kubernetes services.
Question 4: Which ECS feature allows you to define CPU and memory at the task level and override them per container?
- Capacity provider reservations
- Task-level and container-level resource limits in the task definition (Correct answer)
- EC2 instance type selection
- CloudWatch Container Insights
Correct answer: Task-level and container-level resource limits in the task definition
ECS task definitions support task-level CPU/memory (required for Fargate) and optional per-container limits that cannot exceed the task-level allocation.
Question 5: In a CodePipeline deploying to EKS, which action would apply a Kubernetes manifest stored in S3 to the cluster?
- Use a CodeDeploy deploy action
- Use an AWS Lambda action that runs kubectl apply (Correct answer)
- Use an ECS deploy action
- Use a CloudFormation deploy action with an EKS stack
Correct answer: Use an AWS Lambda action that runs kubectl apply
Since CodePipeline has no native EKS action, a Lambda function (or CodeBuild step) running kubectl apply is the standard pattern for deploying Kubernetes manifests.
Question 6: Which ECS capacity provider strategy setting ensures a minimum number of tasks run on Fargate while using EC2 Spot for additional capacity?
- base and weight parameters in a mixed capacity provider strategy (Correct answer)
- Service Auto Scaling target tracking
- Cluster Auto Scaling with a single provider
- ECS task placement constraints
Correct answer: base and weight parameters in a mixed capacity provider strategy
Setting a 'base' value on Fargate ensures a guaranteed minimum task count, while 'weight' distributes additional tasks proportionally between providers.
Question 7: What AWS feature allows you to share ECR repositories across multiple AWS accounts in an organization without copying images?
- ECR replication to S3
- ECR cross-account resource policies (Correct answer)
- ECR public gallery
- AWS RAM (Resource Access Manager) for ECR
Correct answer: ECR cross-account resource policies
ECR supports repository policies that grant cross-account pull/push permissions, enabling multiple accounts to use the same image without duplication.
Which AWS service provides a managed Kubernetes experience and handles control plane upgrades and patching automatically?