AWS Certified Developer – Associate — Question 89
A company needs an event-management platform to accept registrations for an upcoming event. The platform must perform a single invocation of an existing AWS Lambda function 10 minutes after a user completes a new account registration.
Which solution will meet these requirements?
Answer options
- A. Add an item to an Amazon DynamoDB table. Set the item TTL to 10 minutes. Invoke the Lambda function when the TTL expires.
- B. Create an ongoing Amazon EventBridge (Amazon CloudWatch Events) rule with a rate expression of 600 seconds. Create a rule/target to invoke the Lambda function.
- C. Send a message to an Amazon Simple Queue Service (Amazon SQS) delay queue. Set the queue to 600 seconds. Configure the Lambda function with the queue as an event source.
- D. Put a record in Amazon Kinesis Data Streams. Configure the Lambda function to use the data stream as an event source. Define the shard iterator AT_TIMESTAMP setting to 10 minutes.
Correct answer: C
Explanation
Option C is correct because using an Amazon SQS delay queue allows for a message to be delayed for exactly 600 seconds, triggering the Lambda function after the required time. Option A will not invoke the Lambda function at the correct time as TTL expiration does not directly trigger a Lambda function. Option B would continuously invoke the Lambda function every 10 minutes, which does not meet the requirement of a single invocation. Option D is not suitable as it involves Kinesis Data Streams, which does not provide a straightforward way to delay processing for a specified time.