A website displays a daily newsletter stored in English. When a user visits, a Lambda function queries the company's on-premises database for the current newsletter, calls Amazon Translate TranslateText to translate it for the user, and returns the translated text. Traffic has increased and the on-premises database is overloaded, slowing responses. The company cannot change the database. Which change will improve the Lambda function's response time?
Choose an answer
Tap an option to check your answer.
Correct answer: Cache the translated newsletters in the Lambda function's /tmp directory..
Why this is the answer
Caching the translated newsletters in the Lambda function's /tmp directory (or an external cache like ElastiCache or DynamoDB) is the most effective solution. This reduces the number of calls to the overloaded on-premises database and Amazon Translate, directly addressing the bottlenecks. The /tmp directory is suitable for temporary storage within a Lambda execution environment. Switching to asynchronous invocations would not improve response time for the user; it would only change how the Lambda function is invoked. Enabling caching for TranslateText API calls is not a standard feature; Translate is a real-time translation service. Modifying the Lambda function to process requests in parallel would further stress the overloaded on-premises database, worsening the problem.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed