DVA-C02 practice question 13 of 35
A developer is creating a service that uses an Amazon S3 bucket for image uploads. The service will use an AWS Lambda function to create a thumbnail of each image Each time an image is uploaded the service needs to send an email notification and create the thumbnail The developer needs to configure the image processing and email notifications setup. Which solution will meet these requirements?
Full set: 598 questionsDomain Troubleshooting and Optimization
This scenario requires a "fan-out" pattern, where a single event (an S3 object creation) triggers multiple, independent actions (Lambda invocation and email notification). Amazon Simple Notification Service (SNS) is designed specifically for this pub/sub, fan-out messaging model. By configuring S3 event notifications to publish to an SNS topic, the event is sent to a central point. The Lambda function can subscribe to this topic to process the image, and an email endpoint can also be subscribed to the same topic to send the notification. This architecture is efficient, decoupled, and directly addresses both requirements using the most appropriate services.
B: This option is overly complex. There is no native capability to create an email subscription directly to an SQS queue. The SQS queue adds an unnecessary and non-functional step for the email notification. C: Amazon SQS is a queueing service, not a fan-out service. A message sent to an SQS queue is typically processed by only one consumer. Also, SQS does not support direct email subscriptions. D: While EventBridge can handle fan-out, this solution incorrectly routes the notification to an SQS queue. SQS does not support direct email subscriptions, making the final step of the notification workflow invalid.
1. AWS S3 Developer Guide: "Configuring Amazon S3 event notifications" - This document lists Amazon SNS topics, Amazon SQS queues, and AWS Lambda functions as supported destinations for S3 event notifications. This validates the initial step of the correct architecture. (See section: "Event notification destinations").
2. AWS SNS Developer Guide: "Common Amazon SNS scenarios" - The "Fanout" scenario is explicitly described: "a message published to an SNS topic can be replicated and pushed to multiple endpoints... For example, you can... send a message to an Amazon SQS queue, which then sends the message to a Lambda function." This confirms SNS is the correct service for fan-out to multiple subscriber types. (See section: "Fanout").
3. AWS SNS Developer Guide: "Subscribing to an Amazon SNS topic" - This page lists the available protocols for subscriptions, which include AWS Lambda and Email/Email-JSON. This confirms that both required actions can be subscribed to a single SNS topic. (See table: "Subscription and delivery protocols").
4. AWS Lambda Developer Guide: "Using AWS Lambda with Amazon SNS" - This guide details how to use an SNS topic to trigger a Lambda function, which is a core part of the required solution. (See section: "Invoking Lambda functions using Amazon SNS notifications").
Keep practicing
Take the free DVA-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DVA-C02 practice questions
- Question 1A company has a multi-node Windows legacy application that runs on premises. The applicat…
- Question 2A developer migrated a legacy application to an AWS Lambda function. The function uses a …
- Question 3A development learn has an Amazon API Gateway REST API that is backed by an AWS Lambda fu…
- Question 4A company is expanding the compatibility of its photo-snaring mobile app to hundreds of a…
- Question 5A company has an ecommerce application. To track product reviews, the company's developme…
- Question 6A social media company is designing a platform that allows users to upload data, which is…
