Q33 — AWS DVA-C02 Ch.1
Question 33 of 100 | ← Chapter 1
A developer designed an application that stores incoming data as JSON files in Amazon S3 objects. Subsequently, custom business logic in an AWS Lambda function processes these objects and loads the data into an Amazon DynamoDB table. Recently, the workload experienced sudden and significant traffic fluctuations. The rate at which data flows into the DynamoDB table has hit a throttling limit. The developer needs to implement a solution to eliminate the throttling and load data into the DynamoDB table more consistently. Which solution meets these requirements?
- A. Refactor the Lambda function into two functions. Configure one function to transform the data and another to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue between the two functions to store items as messages and invoke the second function. ✓
- B. Enable auto scaling for the DynamoDB table. Use Amazon CloudWatch to monitor the table's read and write capacity metrics and track consumed capacity.
- C. Create an alias for the Lambda function. Configure provisioned concurrency for the application.
- D. Refactor the Lambda function into two functions. Configure one function to store data in the DynamoDB table. Configure a second function to process the data and update items after data is stored in DynamoDB. Create a DynamoDB stream to invoke the second function after data is stored.
Correct Answer: A. Refactor the Lambda function into two functions. Configure one function to transform the data and another to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue between the two functions to store items as messages and invoke the second function.
Explanation
The developer's goal is to eliminate throttling limits on the Amazon DynamoDB table to load data more consistently. Option A suggests splitting the Lambda function into two functions—one for transforming data and another for loading data into DynamoDB—with an Amazon Simple Queue Service (SQS) queue acting as a buffer between them to store items as messages and trigger the second function. This solution enables asynchronous processing, thereby smoothing out traffic pressure on DynamoDB. 【Lantern Certification provided by: swufelp1999】