
Answer-first summary for fast verification
Answer: Create an SNS subscription that sends the event to Amazon Simple Queue Service (Amazon SQS). Configure the SQS queue to trigger a Lambda function.
## Explanation **Correct Answer: C** - Create an SNS subscription that sends the event to Amazon Simple Queue Service (Amazon SQS). Configure the SQS queue to trigger a Lambda function. ### Why Option C is Correct: 1. **Decoupling and Scalability**: Using SQS as an intermediary between SNS and Lambda provides a buffer that can handle varying workloads. SQS queues can absorb spikes in traffic and allow Lambda functions to process messages at their own pace. 2. **Reliability**: SQS provides message durability and at-least-once delivery semantics. If a Lambda function fails to process a message, it remains in the queue for retry. 3. **Native Integration**: AWS Lambda has native integration with SQS as an event source. Lambda can automatically poll SQS queues and scale based on the number of messages in the queue. 4. **Error Handling**: Failed messages can be moved to a Dead Letter Queue (DLQ) for further analysis and processing. ### Why Other Options Are Incorrect: **Option A (ECS)**: While ECS can process events, it adds unnecessary complexity and doesn't provide the same level of automatic scaling and integration that SQS + Lambda offers. ECS requires managing containers and scaling policies. **Option B (EKS)**: Similar to ECS, EKS adds container orchestration complexity and isn't the most efficient way to handle S3 event processing. It's over-engineered for this use case. **Option D (AWS SMS)**: AWS Server Migration Service is for migrating physical servers to AWS, not for event processing. This option is completely irrelevant to the scenario. ### Best Practice Architecture: The recommended pattern is: 1. S3 Event → SNS Topic 2. SNS Topic → SQS Queue (via subscription) 3. SQS Queue → Lambda Function (as event source) This architecture provides: - **Scalability**: Lambda automatically scales based on queue depth - **Reliability**: Messages are persisted in SQS until processed - **Cost-effectiveness**: Pay only for what you process - **Maintainability**: Simple, serverless architecture with minimal operational overhead
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A development team is creating an event-based application that uses AWS Lambda functions. Events will be generated when files are added to an Amazon S3 bucket. The development team currently has Amazon Simple Notification Service (Amazon SNS) configured as the event target from Amazon S3.
What should a solutions architect do to process the events from Amazon S3 in a scalable way?
A
Create an SNS subscription that processes the event in Amazon Elastic Container Service (Amazon ECS) before the event runs in Lambda.
B
Create an SNS subscription that processes the event in Amazon Elastic Kubernetes Service (Amazon EKS) before the event runs in Lambda.
C
Create an SNS subscription that sends the event to Amazon Simple Queue Service (Amazon SQS). Configure the SQS queue to trigger a Lambda function.
D
Create an SNS subscription that sends the event to AWS Server Migration Service (AWS SMS). Configure the Lambda function to poll from the SMS event.