QuestionQ107

VerifiedOperational Efficiency and Optimization for GenAI Applications

A financial services company is building a natural language processing (NLP) application that uses an AWS Lambda function to process customer trade inquiries using Amazon Bedrock foundation models (FMs). The Lambda function needs to generate comprehensive trade analysis responses that typically:

  • Exceed 4 MB in size
  • Require 15-20 seconds to complete

The application must also:

  • Respond to customer inquiries in under 10 seconds
  • Comply with financial regulatory requirements to retain records for 10 years

Which solution will meet these requirements?

Explanation

Lambda response streaming allows the function to send partial output to the client as it is generated, so the customer starts receiving output well within the 10-second requirement even though full generation takes 15-20 seconds. A 30-second Lambda execution timeout ensures the function has enough time to finish generating the full 15-20 second response without being prematurely terminated (a 15-second timeout risks cutting off longer responses). Storing the complete response records in Amazon S3 provides durable, long-term storage suitable for meeting the 10-year regulatory retention requirement, which CloudWatch logs, X-Ray traces, or ElastiCache caching are not designed to satisfy.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!