Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 97 discussion

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?

  • 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.
  • B. 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.
  • C. Create an alias for the Lambda function. Configure provisioned concurrency for the application to use.
  • D. 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
ihebchorfi
Highly Voted 1 year, 6 months ago
Selected Answer: 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.
upvoted 26 times
...
MrTee
Highly Voted 1 year, 6 months ago
Selected Answer: 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.
upvoted 9 times
nbxyzd
1 week, 5 days ago
Read carefully: The flow of data to the DynamoDB table is becoming throttled. So the bottleneck is the DynamoDB, not the lambda function transforming the data. Option D doesn't help because the first function storing data into the DynamoDB will still hit the throttling issue.
upvoted 2 times
...
Ashwinvdm22
9 months, 2 weeks ago
The problem I have with option D is that it is adding more lad on the DynamoDB table. What is the need to insert the item and then update the item later. This is performing two operation on every item just to get it into the correct state. I would go with option A since it is not performing two operations on the DB and hence reducing the load which will help with throttling.
upvoted 1 times
...
robotgeek
1 year, 5 months ago
Sorry but when you say "the first function can store the data into the DynamoDB table and exit quickly, avoiding any throttling issues" I dont understand your point
upvoted 5 times
...
[Removed]
11 months, 1 week ago
I disagree... the order of the function with this option makes NO sense. I go with A
upvoted 1 times
...
...
nbxyzd
Most Recent 1 week, 5 days ago
Selected Answer: A
It's hands-down A.
upvoted 1 times
...
Tluszczyk
3 months, 4 weeks ago
Selected Answer: B
"A" would be optimal, but without backoff algorithm the lambda division and SQS won't affect the throttling. However Dynamo can autoscale https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html
upvoted 1 times
queekao
3 months, 3 weeks ago
Yes, but it asks to "load the data into the DynamoDB table more consistently." Therefore, option A will prevent unintentional data load into DynamoDB, it's the best option.
upvoted 1 times
...
...
65703c1
5 months, 3 weeks ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
nder
8 months ago
Selected Answer: B
we are trying to stop throttling...
upvoted 1 times
...
SerialiDr
8 months, 2 weeks ago
Selected Answer: A
This solution addresses the need to eliminate throttling and ensure consistent data loading into the Amazon DynamoDB table by separating the transformation and loading processes into two different functions. Using an Amazon SQS queue to hold items as messages between the two functions helps manage the flow of data and prevents overloading the DynamoDB table, thereby eliminating throttling issues.
upvoted 2 times
...
Brisun
9 months, 2 weeks ago
Selected Answer: A
A is correct as it requires to write to DynamoDB "more consistently". Option B can solve the problem too but the writing won't be consistent as the traffic will go up and down instantly. In reality, I will probably do Option B only.
upvoted 3 times
...
SD_CS
9 months, 2 weeks ago
Selected Answer: B
I do not feel refactoring the data transformation and loading would help here as I do not think the number of concurrent calls to the DB would decrease because of this. Autoscaling DynamoDB would seem a more potent option to me.
upvoted 3 times
...
peekingpicker
9 months, 4 weeks ago
Selected Answer: B
Why not B ? DynamoDB can autoscale the RCU and WCU
upvoted 4 times
...
SerialiDr
10 months ago
Selected Answer: A
A. Refactor the Lambda function into two functions, using an Amazon SQS queue to manage the data flow, and/or B. Turn on auto scaling for the DynamoDB table to automatically adjust its write capacity based on traffic patterns. Both A and B address the core issue of managing write throughput to the DynamoDB table to prevent throttling. Option A provides a way to smooth out data flow and manage write requests more effectively, while option B allows the table to scale its capacity automatically in response to changing traffic, although with potential limitations in response speed to sudden traffic spikes. Combining these approaches could provide an even more robust solution.
upvoted 3 times
...
KarBiswa
11 months ago
Selected Answer: A
Off course A & D are options but here after inserting the data further we cannot modify because one extra writing cost will incur rather using queue lambda can poll the transformed data
upvoted 3 times
...
Nagasoracle
1 year ago
Selected Answer: A
Answer : A SQS can be configured to invoke Lambda. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-lambda-function-trigger.html
upvoted 4 times
...
dexdinh91
1 year ago
Selected Answer: B
I think B
upvoted 1 times
...
jingle4944
1 year, 1 month ago
Lambda functions can be triggered by SQS: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-lambda-function-trigger.html
upvoted 2 times
nbxyzd
1 week, 5 days ago
Correct, and most importantly, it's triggered *synchronously* so that there won't be throttling issue. Quote: You can use an AWS Lambda function to process messages in an Amazon SQS queue. Lambda polls the queue and invokes your Lambda function synchronously with an event that contains queue messages.
upvoted 1 times
...
...
Balliache520505
1 year, 1 month ago
Selected Answer: B
I don't believe that option A is correct because an Amazon SQS queue wouldn't invoke a Lambda function; in any case, the Lambda function would be configured to retrieve messages from the SQS queue. For that reason, I believe option B would be the correct choice in this case.
upvoted 1 times
...
Dushank
1 year, 2 months ago
Selected Answer: A
Refactoring the Lambda function into two functions and introducing an Amazon Simple Queue Service (Amazon SQS) queue between them would provide a buffering mechanism. The first Lambda function would transform the data and push it to the SQS queue. The second Lambda function would be triggered by messages in the SQS queue to write the data into DynamoDB. This decouples the two operations and allows for more controlled and consistent data loading into DynamoDB, helping to avoid throttling.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...