QuestionQ114

VerifiedTroubleshooting and Optimization

A company has a website that displays a daily newsletter. When a user visits the website, an AWS Lambda function processes the browser's request and queries the company's on-premises database to obtain the current newsletter. The newsletters are stored in English. The Lambda function uses the Amazon Translate TranslateText API operation to translate the newsletters, and the translation is displayed to the user.

Due to an increase in popularity, the website's response time has slowed. The database is overloaded. The company cannot change the database and needs a solution that improves the response time of the Lambda function.

Which solution meets these requirements?

Explanation

Lambda's /tmp directory provides temporary storage within a function's lifecycle. Caching translated newsletters here reduces repeated database queries and Translate API calls, improving response time when the same translation is requested again within the 15-minute function lifetime.

Learn more

Community Discussion

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