AIP-C01 · Question #65
AIP-C01 Question #65: Real Exam Question with Answer & Explanation
The correct answer is A: Integrate an Amazon API Gateway HTTP API with an AWS Lambda function to invoke Amazon. Option A is the best solution because it satisfies streaming, token control, and retry requirements while keeping operational overhead low by using fully managed, serverless AWS services. Amazon API Gateway HTTP APIs provide a lightweight, cost-effective front door for APIs and i
Question
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?
Options
- AIntegrate an Amazon API Gateway HTTP API with an AWS Lambda function to invoke Amazon
- BConnect an Amazon API Gateway HTTP API directly to Amazon Bedrock. Simulate streaming by
- CConnect an Amazon API Gateway WebSocket API to an Amazon ECS service that hosts a
- DIntegrate an Amazon API Gateway REST API with an AWS Lambda function that invokes
Explanation
Option A is the best solution because it satisfies streaming, token control, and retry requirements while keeping operational overhead low by using fully managed, serverless AWS services. Amazon API Gateway HTTP APIs provide a lightweight, cost-effective front door for APIs and integrate cleanly with AWS Lambda for request processing and security controls. AWS Lambda response streaming allows the API to begin returning content to the client as soon as partial model output is available, reducing perceived latency and improving user experience for long responses. Using Lambda as the integration layer also provides a centralized place to enforce token-aware request handling, such as rejecting oversized requests, truncating optional context, or applying consistent limits across users and tenants to manage compute usage. Retry logic is best handled in the client or integration layer for transient failures such as timeouts and throttling. Lambda can implement controlled retries with exponential backoff and jitter, while API Gateway timeouts help bound request lifetimes and prevent hung connections from consuming resources indefinitely. Because the model service is managed, the company avoids infrastructure management and focuses only on request shaping, safety, and resiliency behavior.
Topics
Community Discussion
No community discussion yet for this question.