
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
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.
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.
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.
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.
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.
Error Handling: Failed messages can be moved to a Dead Letter Queue (DLQ) for further analysis and processing.
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.
The recommended pattern is:
This architecture provides: