AWS DevOps Container Services 2 — Questions and Answers
Question 1: Which ECS launch type eliminates the need to manage the underlying EC2 instances?
- EC2 launch type
- Fargate launch type (Correct answer)
- External launch type
- Lambda launch type
Correct answer: Fargate launch type
AWS Fargate is a serverless compute engine for containers that removes the need to provision or manage EC2 instances.
Question 2: In Amazon EKS, what component acts as the control plane managing the Kubernetes API server?
- Worker node group
- EKS managed node group
- EKS cluster endpoint
- AWS-managed control plane (Correct answer)
Correct answer: AWS-managed control plane
EKS provides a fully managed Kubernetes control plane (API server, etcd) that AWS operates and scales on your behalf.
Question 3: A DevOps team wants containers to automatically scale based on SQS queue depth. Which AWS service combination achieves this with ECS Fargate?
- ECS Service Auto Scaling with a custom CloudWatch metric from SQS (Correct answer)
- EC2 Auto Scaling with SQS triggers
- AWS Lambda with SQS event source mapping
- EKS Horizontal Pod Autoscaler with SQS
Correct answer: ECS Service Auto Scaling with a custom CloudWatch metric from SQS
ECS Service Auto Scaling can use a custom CloudWatch metric (e.g., ApproximateNumberOfMessagesVisible) from SQS to scale task count.
Question 4: Which ECR feature automatically scans container images for known OS and programming language package vulnerabilities on push?
- ECR image signing
- ECR enhanced scanning with Amazon Inspector (Correct answer)
- ECR lifecycle policies
- ECR replication
Correct answer: ECR enhanced scanning with Amazon Inspector
ECR enhanced scanning integrates with Amazon Inspector to continuously scan images for CVEs in OS packages and language dependencies.
Question 5: What is the purpose of an ECS Task Definition's 'essential' container flag?
- It grants the container root privileges
- If the essential container stops, all containers in the task are stopped (Correct answer)
- It pins the container to a specific EC2 instance
- It ensures the container always runs as a daemon
Correct answer: If the essential container stops, all containers in the task are stopped
Marking a container as essential means ECS will stop the entire task if that container exits, enabling fail-fast behavior.
Question 6: A team uses AWS CodePipeline to deploy to ECS. Which deploy action provider allows zero-downtime blue/green deployments with traffic shifting?
- ECS (Rolling Update)
- CodeDeployToECS (Correct answer)
- CloudFormation
- Elastic Beanstalk
Correct answer: CodeDeployToECS
The CodeDeployToECS action provider orchestrates blue/green deployments using AWS CodeDeploy, enabling canary or linear traffic shifting.
Question 7: Which Kubernetes object in EKS defines the desired number of identical pod replicas and ensures self-healing if a pod fails?
- DaemonSet
- StatefulSet
- Deployment (Correct answer)
- Job
Correct answer: Deployment
A Kubernetes Deployment manages a ReplicaSet to maintain the desired pod count and replaces failed pods automatically.
Which ECS launch type eliminates the need to manage the underlying EC2 instances?