AIP-C01 · Question #12
A company is developing a customer support application that uses Amazon Bedrock foundation models (FMs) to provide real-time AI assistance to the company's employees. The application must display…
The correct answer is A. Configure an Amazon API Gateway WebSocket API with an AWS Lambda integration. Configure. Displaying responses character by character as they are generated requires server-to-client push streaming over a persistent connection. Amazon API Gateway WebSocket API provides exactly this: it maintains a persistent bidirectional connection per client, and the Lambda backend…
Question
A company is developing a customer support application that uses Amazon Bedrock foundation models (FMs) to provide real-time AI assistance to the company's employees. The application must display AI-generated responses character by character as the responses are generated. The application needs to support thousands of concurrent users with minimal latency. The responses typically take 15 to 45 seconds to finish. Which solution will meet these requirements?
Options
- AConfigure an Amazon API Gateway WebSocket API with an AWS Lambda integration. Configure
- BConfigure an Amazon API Gateway REST API with an AWS Lambda integration. Configure the
- CImplement direct frontend client connections to Amazon Bedrock by using IAM user credentials
- DConfigure an Amazon API Gateway HTTP API with an AWS Lambda integration. Configure the
How the community answered
(47 responses)- A55% (26)
- B6% (3)
- C15% (7)
- D23% (11)
Explanation
Displaying responses character by character as they are generated requires server-to-client push streaming over a persistent connection. Amazon API Gateway WebSocket API provides exactly this: it maintains a persistent bidirectional connection per client, and the Lambda backend can push incremental Bedrock streaming response tokens to the client using the API Gateway Management API (postToConnection). This architecture scales to thousands of concurrent users because WebSocket connections are handled by API Gateway (fully managed, auto-scaling) with Lambda processing each stream. The 15–45 second generation window is handled gracefully since the WebSocket connection persists for the duration. Option B (REST API) is request-response and cannot push streaming data; Lambda response payload size and timeout limits also create problems for long generations. Option C (direct IAM user credentials in frontend) is a critical security anti-pattern - credentials would be exposed to end users. Option D (HTTP API) does not support the server-push streaming model needed for character-by-character display.
Topics
Community Discussion
No community discussion yet for this question.