Running Docker Containers with AWS Fargate ECS EKS
Short answer
AB Use Amazon ECS or EKS with AWS Fargate to host Docker containers in a fully managed, serverless environment that scales automatically without infrastructure overhead.
Question
Key Takeaways
The core trap is distinguishing between managed orchestration services (ECS/EKS with Fargate) and function-as-a-service platforms (Lambda), where the latter is not designed for long-running containerized applications despite supporting container images.
This question explores serverless container hosting on AWS using Amazon ECS and EKS with AWS Fargate to eliminate infrastructure management overhead while ensuring automatic scaling.
Common mistake: Many learners incorrectly select Option C (API Gateway + Lambda) because they associate 'serverless' and 'containers' without realizing that Lambda is intended for event-driven functions, not managing scalable container clusters or services like ECS/EKS.
Expert Analysis
Why the Answer Is Correct
Options A and B are correct because both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS) offer a serverless compute plane called AWS Fargate. Fargate allows you to run containers without managing any underlying servers, meaning there is no EC2 infrastructure to provision, patch, or scale manually. Both services automatically scale based on demand, satisfying the requirement for appropriate scaling without operational overhead.
Why the Other Options Are Wrong
Option C is incorrect because although AWS Lambda supports running container images, it is designed for short-lived, event-driven functions rather than hosting full containerized applications or microservices that require persistent orchestration. Options D and E involve Amazon EC2 worker nodes, which require the user to manage the operating system, security patches, and capacity planning of the instances, directly violating the 'no additional operational overhead' constraint.
Community Comment Notes
Community consensus strongly favors AB, noting that Fargate provides the necessary managed service layer. As Rhydian25 noted, "The question is asking for two alternatives to run Docker containers in a serverless service with minimal effort." Several users pointed out that Lambda (Option C) is not suitable for this use case, with one commenter stating, "API Gateway + Lamda are not designed for running Dockers containers directly." Another user clarified the distinction by saying, "AB are using AWS Fargate which IS considered a managed service... DE you have to manage your own EC2 instances thus not consider managed."
Official Reference
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate.html
- https://docs.aws.amazon.com/eks/latest/userguide/fargate.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When asked for managed container solutions with zero infrastructure overhead, always look for 'Fargate' as the key differentiator from standard EC2-based deployments. Remember that Lambda is for functions, while ECS/EKS are for container orchestration.
Frequently Asked Questions
Why can't I use AWS Lambda to run Docker containers?
What is the difference between ECS and EKS with Fargate?
Community Votes
71% of anonymous learners picked answer AB. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 15 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 15
-
Rhydian25 👍 4The question is asking for two alternatives to run Docker containers in a serverless service with minimal effort. Option C will require a lot of effort to configure the Lambda and the API Gateway to run the Container correctly. Instead, just use EKS o ECS with Fargate to execute the container image
-
striker89 👍 3API Gateway + Lamda are not designed for running Dockers containers directly
-
LeonSauveterre 👍 2A or B is OK. About C: Amazon API Gateway and AWS Lambda are not typically used for running Docker containers. Lambda is designed for serverless functions, and while you can use Lambda to invoke containerized tasks, it does not run containers directly.
-
FlyingHawk 👍 2A or B is okay, why not C? While AWS Lambda now supports running Linux-based container images, it is primarily designed for microservices or event-driven functions rather than managing scalable containerized applications like Amazon ECS or Amazon EKS
-
jcck202020 👍 2AB are using AWS Fargate which IS considered a managed service, option C does not run containers, , DE you have to manage your own EC2 instances thus not consider managed
Show 10 more comments
-
NayeraB 👍 2Are people picking A&B as alternate solutions? Is the question asking for alternates?? Am I missing something? Somebody explain please I'm super confused.
-
sheilawu 👍 2It should be AB, Container :ECS , EKS
-
JA2018 👍 1AWS Fargate: Both ECS and EKS with Fargate provide a fully managed container orchestration service where you don't need to manage underlying infrastructure like EC2 instances, making it ideal for scaling and reducing operational overhead. Scaling capabilities: Both options allow for automatic scaling based on demand, meaning the container instances will automatically scale up or down based on application requirements.
-
MatAlves 👍 1- Container = ECS or EKS - "managed service to host the application" = Fargate - "not result in additional operational overhead or infrastructure to manage" = ECS for the win. The main difference between ECS and EKS = simplicity vs flexibility. https://aws.amazon.com/blogs/containers/amazon-ecs-vs-amazon-eks-making-sense-of-aws-container-services/
-
xBUGx 👍 9I don't want confuse other...
-
Abdullah2004 👍 3For sure
-
1e22522 👍 2glowies out reeeeeeeeeeeeeeee
-
asdfcdsxdfc 👍 2Everyone is picking AB too..
-
victor78 👍 2It should be AB
-
kempes 👍 2Option AB
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →