AWS Certified Developer – Associate / Question #653 of 557

Question #653

A developer is designing a service that uses an Amazon S3 bucket to store uploaded documents. The service requires an AWS Lambda function to process each document and generate a summary. Additionally, each document upload must trigger an SMS notification. The developer needs to configure the document processing and SMS notifications efficiently.

A

Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications to publish to the SNS topic. Subscribe the Lambda function to the SNS topic. Add an SMS subscription to the SNS topic.

B

Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure S3 event notifications to send messages to the SQS queue. Subscribe the Lambda function to the SQS queue. Add an SMS subscription to the SQS queue.

C

Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications to publish to the SNS topic. Create an Amazon EventBridge rule to trigger the Lambda function when documents are uploaded. Add an SMS subscription to the EventBridge rule.

D

Use Amazon EventBridge to monitor the S3 bucket. Create an EventBridge rule that triggers the Lambda function and sends an SMS notification via Amazon Simple Email Service (Amazon SES) when documents are uploaded.

Explanation

Option A is correct because:
1. S3 Event Notifications: S3 can publish events directly to an SNS topic.
2. Fan-Out via SNS: The SNS topic can send the event to multiple subscribers, including the Lambda function (for document processing) and an SMS subscription (for notifications).
3. Efficiency: This setup avoids redundant configurations and ensures both actions are triggered by a single S3 event.

Other options are incorrect because:
- B: SQS queues cannot directly trigger SMS notifications, and SQS is designed for decoupled messaging, not multi-subscriber fan-out.
- C: EventBridge cannot natively send SMS notifications; SMS requires SNS.
- D: Amazon SES is for email, not SMS, and EventBridge cannot directly send SMS.

Key Points: Use SNS for multi-subscriber event distribution (e.g., Lambda + SMS) and S3 event notifications to trigger downstream services.

Answer

The correct answer is: A