DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 378


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?

Show Answer
Correct Answer: B

Caching the translated newsletters in the Lambda/tmp directory can help reduce the repeated load on the on-premises database by storing the results of translations temporarily. This approach takes advantage of the local temporary storage provided by AWS Lambda, which can be a simple but effective way to improve response times. Note that while this directory is ephemeral, meaning it is cleared when the function execution environment is recycled, it can still be useful for caching within a single execution context, potentially reducing repeated queries to the database during that time frame.

Discussion

1 comment
Sign in to comment
komorebi
Jul 13, 2024

B. Cache the translated newsletters in the Lambda/tmp directory.

catoteja
Jul 21, 2024

No. Tmp directory is TEMPORAL and ephemeral