Topic 1 Question 97
A developer has designed an application to store incoming data as JSON files in Amazon S3 objects. Custom business logic in an AWS Lambda function then transforms the objects, and the Lambda function loads the data into an Amazon DynamoDB table. Recently, the workload has experienced sudden and significant changes in traffic. The flow of data to the DynamoDB table is becoming throttled.
The developer needs to implement a solution to eliminate the throttling and load the data into the DynamoDB table more consistently.
Which solution will meet these requirements?
Refactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in between the functions to hold the items as messages and to invoke the second function.
Turn on auto scaling for the DynamoDB table. Use Amazon CloudWatch to monitor the table's read and write capacity metrics and to track consumed capacity.
Create an alias for the Lambda function. Configure provisioned concurrency for the application to use.
Refactor the Lambda function into two functions. Configure one function to store the data in the DynamoDB table. Configure the second function to process the data and update the items after the data is stored in DynamoDB. Create a DynamoDB stream to invoke the second function after the data is stored.
ユーザの投票
コメント(8)
- 正解だと思う選択肢: D
This solution will allow the developer to store the incoming data into the DynamoDB table more consistently without being throttled. By splitting the Lambda function into two functions, the first function can store the data into the DynamoDB table and exit quickly, avoiding any throttling issues. The second function can then process the data and update the items after the data is stored in DynamoDB using a DynamoDB stream to invoke the second function. Option A is also a good option but not the best solution because it introduces additional complexity and cost by using an Amazon SQS queue.
👍 5MrTee2023/04/21 - 正解だと思う選択肢: A
A. Refactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in between the functions to hold the items as messages and to invoke the second function.
By breaking the Lambda function into two separate functions and using an SQS queue to hold the transformed data as messages, you can decouple the data transformation and loading processes. This allows for more controlled loading of data into the DynamoDB table and helps eliminate throttling issues.
👍 4ihebchorfi2023/04/29 - 正解だと思う選択肢: B
B => I think the problem here is the "...sudden and significant changes in traffic..." the current write capacity in DynamoDB is not enough to insert all incoming data, Decoupling is good practice but won't solve the problem in this case because the question doesn't mention that the increase in the traffic is temporary so any solution without increasing the write capacity will create a bottleneck.
👍 1rlnd20002023/05/14
シャッフルモード