Q62 — AWS DVA-C02 Ch.3
Question 62 of 100 | ← Chapter 3
A photo-sharing application uses Amazon S3 to store image files. All user photos undergo manual review by the company to prevent inappropriate content. Reviews are completed within 1–24 hours and results are stored in an Amazon DynamoDB table, using the S3 object key as the primary key. Database items can be queried via a REST API created by the company. A developer needs to implement an automated workflow to tag each S3 object with its review result. What should the developer do to meet these requirements most efficiently?
- A. Create an AWS Lambda function triggered by s3:ObjectCreated events. Write the S3 key to an Amazon Simple Queue Service (Amazon SQS) queue with a visibility timeout of 24 hours. Create and configure a second Lambda function to read items from the queue. Retrieve each item's result from the DynamoDB table and tag the corresponding S3 object accordingly.
- B. Create an AWS Lambda function triggered by s3:ObjectCreated events. Integrate the function into an AWS Step Functions standard workflow. Define an AWS Step Functions Wait state set to 24 hours. Create and configure a second Lambda function to retrieve the review result after the Wait state completes and tag the S3 object accordingly.
- C. Create an AWS Lambda function that loads all untagged S3 objects. Retrieve each item's result from the REST API and tag each S3 object accordingly. Create and configure an Amazon EventBridge rule to run periodically. Set the Lambda function as the target of the EventBridge rule. ✓
- D. Launch an Amazon EC2 instance. Deploy a script to the EC2 instance that tags S3 objects using external database results. Configure a crontab file to run the script periodically.
Correct Answer: C. Create an AWS Lambda function that loads all untagged S3 objects. Retrieve each item's result from the REST API and tag each S3 object accordingly. Create and configure an Amazon EventBridge rule to run periodically. Set the Lambda function as the target of the EventBridge rule.
Explanation
The developer should create an AWS Lambda function that loads all untagged S3 objects, retrieves each item's result from the REST API, and tags each S3 object accordingly. Then, create and configure an Amazon EventBridge rule to run the Lambda function periodically, ensuring all untagged S3 objects receive correct tagging. This approach is most efficient because it leverages the event-driven architecture of Lambda and the periodic triggering capability of EventBridge. 【Lantern Certification provided by: swufelp1999】