Which API Gateway setup streams Bedrock responses with least operational overhead?

Answer Correct answer: D — Use an API Gateway REST API with a streaming Lambda function to invoke Amazon Bedrock, enforce token limits in Lambda, and implement retries for timeouts.

A company is designing an API for a generative AI (GenAI) application that uses a foundation model (FM) that is hosted on a managed model service. The API must stream responses to reduce latency, enforce token limits to manage compute resource usage, and implement retry logic to handle model timeouts and partial responses. Which solution will meet these requirements with the LEAST operational overhead?

  1. Integrate an Amazon API Gateway HTTP API with an AWS Lambda function to invoke Amazon Bedrock. Use Lambda response streaming to stream responses. Enforce token limits within the Lambda function. Implement retry logic for model timeouts by using Lambda and API Gateway timeout configurations.
  2. Connect an Amazon API Gateway HTTP API directly to Amazon Bedrock. Simulate streaming by using client-side polling. Enforce token limits on the frontend. Configure retry behavior by using API Gateway integration settings.
  3. Connect an Amazon API Gateway WebSocket API to an Amazon ECS service that hosts a containerized inference server. Stream responses by using the WebSocket protocol. Enforce token limits within Amazon ECS. Handle model timeouts by using ECS task lifecycle hooks and restart policies.
  4. Integrate an Amazon API Gateway REST API with an AWS Lambda function that invokes Amazon Bedrock. Use Lambda response streaming to stream responses. Enforce token limits within the Lambda function. Implement retry logic by using Lambda and API Gateway timeout configurations. Correct Answer

Community Insight

Tests whether you know native Lambda response streaming through API Gateway requires a REST API, not an HTTP API, despite the HTTP API’s lower baseline overhead.

This scenario compares API Gateway HTTP, REST, and WebSocket patterns for streaming Amazon Bedrock responses while enforcing token limits and retries. The least-overhead design uses an API Gateway REST API integrated with a Lambda function that streams responses.

Selecting A because HTTP APIs are cheaper and lower-latency by default, overlooking that HTTP APIs do not natively support Lambda response streaming to clients.

Community Discussion (13 comments)

a0c03ac 👍 1 Selected: D
Amazon API Gateway HTTP API - does not support streaming, while REST supports progressive delivery
nebulane 👍 1 Selected: A
answer is A since http api has lower latency than REST for streaming
Chibuzo1 👍 1 Selected: A
he critical architectural detail: HTTP API (not REST API) is the correct API Gateway type here because it supports Lambda response streaming and has lower latency and cost than REST API.
Naaser 👍 1 Selected: A
Managed Services: Amazon Bedrock is a fully managed service for foundation models, eliminating the need to manage infrastructure (unlike the ECS option in C).Response Streaming: Lambda response streaming (introduced for Node.js and Python) allows the API Gateway HTTP API to push partial payloads to the client as they are generated, satisfying the low-latency requirement.Least Operational Overhead: HTTP APIs are simpler and cheaper than REST APIs (Option D) and integrate seamlessly with Lambda for event-driven scaling.
Kimzia 👍 4 Selected: D
Response streaming is only supported for REST APIs.
Wardove 👍 4 Selected: D
only (D) uses REST API + Lambda response streaming, this IS valid as of November 2025. REST API is the ONLY API Gateway type that supports Lambda response streaming https://aws.amazon.com/about-aws/whats-new/2025/11/api-gateway-response-streaming-rest-apis/
Kraftzman 👍 4 Selected: D
Option A (HTTP API): While HTTP APIs are often faster/cheaper, native payload response streaming is currently a feature exclusive to REST APIs in API Gateway. Attempting this with an HTTP API would require a Lambda Function URL proxy, adding an extra layer of configuration.
attila9778 👍 6 Selected: D
Amazon API Gateway HTTP API - does not support streaming, while REST supports progressive delivery
Tanle 👍 2 Selected: A
Correct ansswer
taka5094 👍 2 Selected: A
D: REST API does not natively support streaming responses. A: The HTTP API is more suitable for streaming use cases and can meet requirements with lower latency and lower cost.
eesa 👍 2 Selected: A
Stream responses para reducir latencia Enforce token limits para gestionar recursos Implement retry logic para timeouts y respuestas parciales LEAST operational overhead
xyztest 👍 2 Selected: D
Correct Answer
GiorgioGss 👍 2 Selected: A
"LEAST operational overhead"

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option D aligns with the current AWS capability: an API Gateway REST API can use a Lambda proxy integration with response streaming, so the Lambda function can invoke Amazon Bedrock and progressively return the model output. Token limits can be enforced inside the Lambda function before and during the Bedrock invocation, and retry logic for timeouts or partial responses can run in the same function with API Gateway timeout settings as a backstop. This design avoids container orchestration, WebSocket session management, or client-side polling, so it has the least operational overhead among the streaming-capable choices. It also keeps token enforcement and retry behavior server-side, where it can be trusted.

Why the Other Options Are Wrong

Option A is close but uses an HTTP API; HTTP APIs do not natively support Lambda response streaming to the client, so achieving progressive delivery would require an additional Function URL proxy or similar workaround that adds configuration. Option B does not stream at all: direct HTTP API integration with Bedrock plus client-side polling and frontend token limits is inefficient and insecure, and polling is not the required low-latency streaming design. Option C uses WebSocket APIs and an ECS-hosted inference server, which introduces container task lifecycle management, scaling, restart policies, and WebSocket state handling—far more operational overhead. Option B also improperly enforces token limits on the frontend, which cannot reliably manage compute usage.

Community Comment Notes

Wardove pointed to the November 2025 AWS announcement that response streaming is supported for REST APIs, which is the decisive detail. attila9778 and Kimzia both noted that HTTP APIs do not support streaming while REST APIs support progressive delivery, and Kraftzman added that an HTTP API solution would need a Lambda Function URL proxy, adding configuration. Some learners initially chose A because HTTP APIs are generally cheaper and lower-latency, but that general advantage does not satisfy the native streaming requirement in this question.

Official Reference

Exam Strategy

When LEAST operational overhead appears, first eliminate options that add container lifecycle or WebSocket state management. Then verify the exact managed-service feature: API Gateway REST APIs support Lambda response streaming, while HTTP APIs do not natively, so the cheaper HTTP API is not automatically correct.

Frequently Asked Questions

Why is an API Gateway HTTP API not the best choice for streaming here?

HTTP APIs do not natively support Lambda response streaming, so you would need a Lambda Function URL proxy or similar workaround, which adds configuration and overhead.

Does Amazon API Gateway REST API support Lambda response streaming?

Yes. AWS added REST API response streaming, enabling a streaming Lambda integration to deliver Amazon Bedrock output progressively to the client.

More AIP-C01 FAQ →

Related Analysis

Practice All AIP-C01 Questions

Access 110 questions with complete answers and detailed explanations.

View Full AIP-C01 Practice Test →

← Back to AIP-C01 Study Guide