AWS Certified Developer – Associate — Question 70
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
- A. Change to asynchronous Lambda function invocation.
- B. Cache the translated newsletters in the Lambda /tmp directory.
- C. Enable TranslateText API caching.
- D. Change the Lambda function to use parallel processing.
Correct answer: B
Explanation
The correct answer is B because caching the translated newsletters in the Lambda /tmp directory allows for quicker access to previously translated content, reducing the need for repeated database queries. Options A and D do not address the database overload issue, and option C is incorrect as the TranslateText API does not support caching natively.