AIP-C01 practice question: Synchronous, asynchronous and batch model invocation
Implementation and Integration A free question from our original AIP-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.
A tax software company's assistant answers filing questions. Users type a question in a web app, and a Lambda function calls a model on Amazon Bedrock and returns the answer through an Amazon API Gateway REST API. Long answers take 45 to 60 seconds, but the REST API integration stops waiting after 29 seconds, so those users see errors.
The company has three requirements. Users must not see timeout errors on long answers, text should appear as the model writes it, and the team does not want to change the model or the web app's short requests.
Which TWO actions meet these requirements? (Choose two.)
Choose two answers.
AA. Stream the answer with ConverseStream from a Lambda function with response streaming, exposed through a Lambda function URL, so text reaches the browser as it is generated.
BB. Raise the timeout of the Lambda function to 15 minutes and keep the REST API unchanged, so that the function has time to finish long answers before the response is returned.
CC. Send long questions to Amazon Bedrock batch inference, which writes the answers to Amazon S3, and have the web app email the user when the file is ready.
DD. Keep the REST API for short requests, such as loading a user's saved filing questions, which complete well within the 29-second integration limit.
EE. Purchase Provisioned Throughput for the model, so that each call returns faster and stays under the 29-second integration limit without any change to the API.
B. Wrong: The Lambda timeout does not change how long the REST API waits, so users still see errors after 29 seconds. The change also does nothing to show text as it is generated.
C. Wrong: Batch inference is designed for large offline jobs, and the answers arrive hours later, not during the session. Email delivery also does not meet the requirement for text that appears as it is written.
E. Wrong: Provisioned Throughput reserves capacity but does not guarantee that one long answer finishes in under 29 seconds. It also does not show text as it is written, and it adds a fixed hourly cost.
Explanation
Streaming through a Lambda function URL lets long answers reach the browser as they are generated, without passing through the REST API's integration timeout. The REST API stays in place for short requests that finish quickly. Longer timeouts, batch processing and reserved capacity each leave the 29-second limit or the streaming need unmet.
Want more on Synchronous, asynchronous and batch model invocation? The 5 full-length practice sets have 5 more Synchronous, asynchronous and batch model invocation questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →