AWS Certified Developer – Associate (DVA-C02) — Question 391

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?

Answer options

Correct answer: B

Explanation

Caching the daily newsletter in the Lambda execution environment's /tmp directory allows subsequent warm invocations to serve the translated content directly, avoiding redundant calls to the overloaded on-premises database and Amazon Translate. Asynchronous invocation is unsuitable because the user needs the translated output in real-time. There is no built-in TranslateText API caching mechanism, and parallel processing does not reduce the load on the backend database.