exam questions

Exam AWS Certified Developer Associate All Questions

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

Exam AWS Certified Developer Associate topic 1 question 166 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 166
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer supports an application that accesses data in an Amazon DynamoDB table. One of the item attributes is expiration Date in the timestamp format. The application uses this attribute to find items, archive them, and remove them from the table based on the timestamp value.

The application will be decommissioned soon, and the developer must find another way to implement this functionality. The developer needs a solution that will require the least amount of code to write.

Which solution will meet these requirements?

  • A. Enable TTL on the expirationDate attribute in the table. Create a DynamoDB stream. Create an AWS Lambda function to process the deleted items. Create a DynamoDB trigger for the Lambda function.
  • B. Create two AWS Lambda functions: one to delete the items and one to process the items. Create a DynamoDB stream. Use the DeleteItem API operation to delete the items based on the expirationDate attribute. Use the GetRecords API operation to get the items from the DynamoDB stream and process them.
  • C. Create two AWS Lambda functions: one to delete the items and one to process the items. Create an Amazon EventBridge (Amazon CloudWatch Events) scheduled rule to invoke the Lambda functions. Use the DeleteItem API operation to delete the items based on the expirationDate attribute. Use the GetRecords API operation to get the items from the DynamoDB table and process them.
  • D. Enable TTL on the expirationDate attribute in the table. Specify an Amazon Simple Queue Service (Amazon SQS) dead-letter queue as the target to delete the items. Create an AWS Lambda function to process the items.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
k1kavi1
Highly Voted 2 years, 6 months ago
Selected Answer: A
https://aws.amazon.com/blogs/database/automatically-archive-items-to-s3-using-dynamodb-time-to-live-with-aws-lambda-and-amazon-kinesis-firehose/
upvoted 6 times
...
rcaliandro
Most Recent 1 year, 11 months ago
I won't vote even if from the comments seems to be A. What I didn't understand why we don't just enable TTL on the expirationDate attribute? Why we enable a DynamoDB stream and trigger a lambda function as soon as an item has been deleted?
upvoted 1 times
kaes
1 year, 8 months ago
"application uses this attribute to find items, ARCHIVE them, and remove them from the table" One thing is to remove entry from the table, but we need to archive it somewhere as well
upvoted 2 times
...
...
pancman
2 years, 3 months ago
Selected Answer: A
Easy A
upvoted 1 times
...
sichilam
2 years, 4 months ago
A it is
upvoted 1 times
...
thensanity
2 years, 5 months ago
least amount of code to write - dynamoDB ez
upvoted 2 times
...
michaldavid
2 years, 6 months ago
Selected Answer: A
aaaaaaaaa
upvoted 4 times
...
CloudHandsOn
2 years, 6 months ago
I believe the answer is A. We can set TTL in dynamoDB to remove items
upvoted 2 times
...
kapil206001
2 years, 6 months ago
A https://aws.amazon.com/blogs/database/automatically-archive-items-to-s3-using-dynamodb-time-to-live-with-aws-lambda-and-amazon-kinesis-firehose/
upvoted 3 times
...
sionita
2 years, 6 months ago
A- TTL and a DynamoDB stream
upvoted 3 times
...
dark_cherrymon
2 years, 6 months ago
Selected Answer: C
ccccccccc
upvoted 1 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 ...