Service Discovery and mTLS for ECS Fargate Microservices
A company is designing a microservices architecture using Amazon ECS with Fargate. The services need to communicate with each other. The company wants to implement service discovery and load balancing at the application layer. Which TWO services should the company use?
⚠ Common exam trap
Many candidates confuse Network Load Balancer (NLB) as an application-layer solution because it can handle TLS termination, but it operates at Layer 4 and lacks the HTTP-aware routing required for application-layer communication.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
AWS Cloud Map
AWS Cloud Map (C) is correct because it provides service discovery for ECS services, allowing microservices to register and discover each other via DNS names or API calls, which is essential for dynamic Fargate tasks. Application Load Balancer (D) is correct because it operates at the application layer (Layer 7) and supports HTTP/HTTPS routing, making it suitable for load balancing microservices traffic. Network Load Balancer (B) is not correct because it works at Layer 4 (TCP/UDP) and does not provide application-layer load balancing. Amazon API Gateway (A) is not correct because it is primarily for exposing APIs to external clients, not for internal service-to-service communication. Amazon Route 53 (E) is not correct because it is a DNS service, not a service discovery or application-layer load balancing solution for ECS tasks.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon API Gateway
Why it's wrong here
API Gateway fronts HTTP APIs for external clients; it provides neither service discovery nor application-layer load balancing between ECS tasks. It is the right choice for exposing REST or WebSocket endpoints, authentication and request throttling at the edge.
- ✗
Network Load Balancer (NLB)
Why it's wrong here
NLB balances at layer 4 using IP and port, so it cannot route by HTTP path or host header, and it performs no service discovery. NLB suits ultra-low-latency TCP or UDP workloads, static IP requirements and TLS passthrough.
- ✓
AWS Cloud Map
Why this is correct
AWS Cloud Map provides service discovery for ECS tasks, registering each task's IP address and health status in a namespace so callers resolve healthy endpoints directly. This satisfies the stem's service-discovery requirement for Fargate microservices, where tasks lack stable addresses and no load balancer is needed for discovery itself.
- ✓
Application Load Balancer (ALB)
Why this is correct
Application Load Balancer operates at layer 7, routing HTTP/HTTPS traffic by path, host header or content, which satisfies the requirement for application-layer load balancing across the Fargate tasks. It integrates with ECS service discovery and target groups, distributing requests to healthy microservice tasks registered dynamically.
- ✗
Amazon Route 53
Why it's wrong here
Amazon Route 53 provides DNS resolution, not application-layer load balancing or service discovery for ECS tasks. It cannot register Fargate task IP addresses dynamically or perform HTTP path-based routing. Route 53 suits public DNS, health-checked failover and latency routing across Regions, where resolving a stable hostname to endpoints is the requirement.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.