SAP-C02 Practice Question: Accelerate Workload Migration and Modernization
A company is migrating a legacy API to Amazon API Gateway and Lambda. The API currently uses long-polling to retrieve messages from a queue. The migration must maintain the same client behavior. Which AWS service should replace the long-polling mechanism?
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
✓
Use API Gateway WebSocket APIs to maintain persistent connections.
API Gateway WebSocket APIs enable persistent, bidirectional communication between client and server, allowing the server to push messages to clients without polling. This matches the client's existing long-polling behavior by providing a real-time, event-driven mechanism. Option A (SQS with long polling) still requires the client to poll, which does not eliminate the polling overhead. Option B (Kinesis Data Streams with enhanced fan-out) is designed for streaming data and does not offer a direct polling replacement. Option C (Amazon MQ with STOMP) is a managed message broker but still relies on client-initiated connections or polling, not persistent server-push.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Amazon SQS with long polling enabled.
Why it's wrong here
This still requires polling; does not change client behavior.
- ✗
Use Amazon Kinesis Data Streams with enhanced fan-out.
Why it's wrong here
Kinesis is a streaming service; not directly a replacement for long-polling.
- ✗
Use Amazon MQ (ActiveMQ) with STOMP protocol.
Why it's wrong here
Amazon MQ is a managed broker; STOMP does not inherently provide push.
- ✓
Use API Gateway WebSocket APIs to maintain persistent connections.
Why this is correct
WebSocket APIs allow persistent connections, replacing long-polling.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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.