Which API Gateway Type Is Most Cost-Effective for SNS Pub/Sub?
Short answer
D Configure an API Gateway HTTP API to invoke Lambda to publish to an SNS topic, because HTTP APIs cost less than REST APIs for this pub/sub design.
Question
Key Takeaways
Tests whether you can distinguish API Gateway HTTP API from REST API when a pure SNS pub/sub workload has no REST-only feature requirements; the common trap is choosing REST out of habit despite higher cost.
A serverless migration that needs event-driven pub/sub can use API Gateway, Lambda, and SNS. This page establishes why option D, the HTTP API variant, is the most cost-effective implementation of that pattern.
Common mistake: Many candidates pick B because REST APIs are the familiar default for Lambda integration, but it costs more and adds features not required by the pub/sub requirement.
Expert Analysis
Why the Answer Is Correct
Option D satisfies every stated requirement: API Gateway HTTP API invokes Lambda, Lambda publishes events to an SNS topic, and subscribers receive them in a pub/sub pattern. HTTP APIs were designed as a lower-cost, lower-latency alternative to REST APIs for exactly this kind of straightforward proxy and event use case. Because the question asks for the MOST cost-effective solution and does not request REST-only capabilities, D is preferred over B. The community pricing discussion reinforces that the per-request gap is material.
Why the Other Options Are Wrong
Option B is functionally valid—REST API → Lambda → SNS also implements pub/sub—but it uses the more expensive API Gateway REST API without a requirement that justifies it. Option A uses SQS, which is a queue (point-to-point) rather than pub/sub; multiple subscribers reading the same queue is competing-consumer behavior, not independent pub/sub delivery. Option C uses API Gateway WebSocket API and Kinesis Data Streams with enhanced fan-out, adding unnecessary streaming complexity and cost for simple event fan-out to subscribers. None of these matches the combination of pub/sub semantics and lowest cost as directly as D.
Community Comment Notes
Commenters split mainly between B and D, with the cost argument favoring D. tomasmolinari noted that HTTP APIs offer "lower latency and lower cost than REST APIs", and 78b9037 stated bluntly that "HTTP API is cheaper." jingen11 emphasized that "Http api offers everything the requirements asked for" including Lambda and event-driven behavior. LeonSauveterre agreed SNS fits pub/sub and saw D as plausible, though he called REST API more conventional; Denise123 countered that REST may be more cost-effective for complex apps with extra requirements, which this question does not describe. Taken together, the comments support D when the only differentiator is price and no REST-only features are needed.
Official Reference
- https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html
- https://aws.amazon.com/api-gateway/pricing/
These links open the official vendor documentation in a new tab.
Exam Strategy
When "MOST cost-effectively" appears with no REST-only API Gateway feature called out, compare HTTP API against REST API and favor HTTP API. Confirm the functional pattern is satisfied—here SNS pub/sub—before optimizing on API Gateway price.
Frequently Asked Questions
Why is HTTP API cheaper than REST API for SNS pub/sub?
Does option B become correct if the app needs REST-only features?
Community Votes
64% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 12 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 12
-
78b9037 👍 2 Answered DHTTP API is cheaper. The difference in pricing is steep. REST APIs will run you USD $3.50 per one million requests plus charges for data transferred out. By contrast, HTTP APIs cost a mere $1.00 per request for the first million requests and then $0.90 per million requests after that.
-
tomasmolinari 👍 2 Answered D"HTTP APIs enable you to create RESTful APIs with lower latency and lower cost than REST APIs." HTTP APIs are more cost-effective than REST APIs
-
jingen11 👍 2 Answered DQuestion ask for cheapest. Http api offers everything the requirements asked for. i.e Lambda function for serverless, event driven.
-
dhewa 👍 2 Answered BAn HTTP API instead might not be necessary for this use case.
-
Denise123 👍 1 Answered BWhile the Amazon API Gateway HTTP API (Option D) can be more cost-effective for simple APIs with low data transfer and minimal feature requirements, the Amazon API Gateway REST API (Option B) may still be more cost-effective in many real-world scenarios, especially for more complex web applications with additional requirements. The choice between Options B and D should be based on a careful evaluation of your specific requirements, existing infrastructure, and potential cost savings or trade-offs involved.
Show 7 more comments
-
LeonSauveterre 👍 1 Answered BAmazon SNS is perfectly designed to support the pub/sub pattern efficiently. So B or D. About option D: Using an HTTP API instead of a REST API is less common when using SNS for event publishing. Typically, REST APIs in API Gateway are used for interacting with Lambda functions, making option B a more conventional choice. That said, scenarios vary based on your actual, detailed needs, like predicted frequencies and costs. For the SAA exam, I'll definitely go with B.
-
tch 👍 1REST APIs and HTTP APIs are both RESTful API products. REST APIs support more features than HTTP APIs, while HTTP APIs are designed with minimal features so that they can be offered at a lower price. Choose REST APIs if you need features such as API keys, per-client throttling, request validation, AWS WAF integration, or private API endpoints. Choose HTTP APIs if you don't need the features included with REST APIs.
-
fis_examtopic 👍 1HTTP APIs with Lambda. I'm go with D
-
pujithacg8 👍 2B or D, Will go with B
-
muhammadahmer36 👍 2 Answered DD is the right answer
-
progounick 👍 1 Answered Brest is cheaper than http
-
jfedotov 👍 1 Answered DHttp api
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 →