How to Concurrently Invoke Independent Lambda Functions on an Event?
Short answer
B Publish the sale event from the application to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the three Lambda functions to be triggered by the SNS topic.
Question
Key Takeaways
The question evaluates understanding of publish/subscribe architectures versus queue-based processing, with the common trap being the misuse of SQS or Step Functions for truly independent, fire-and-forget invocations.
This scenario tests AWS event-driven patterns for concurrent, independent function execution using Amazon SNS fan-out. The community unanimously agrees that SNS subscriptions are the optimal solution for decoupling publishers from multiple independent consumers.
Common mistake: Option A (SQS) is frequently chosen incorrectly because candidates confuse message queuing with event broadcasting; SQS delivers messages to only one consumer by default, failing the requirement for concurrent independent execution across all three functions.
Expert Analysis
Why the Answer Is Correct
Amazon SNS implements a true publish/subscribe model that automatically fans out events to all subscribed endpoints simultaneously. By subscribing each Lambda function directly to an SNS topic, the sale event triggers all three functions concurrently without any dependency on each other's outcomes. This architecture natively satisfies the requirement for independent execution regardless of success or failure. It also provides built-in retry mechanisms and dead-letter queue support for failed deliveries.
Why the Other Options Are Wrong
Option A uses SQS, which follows a point-to-point delivery model where a message is consumed by only one recipient, breaking the concurrency requirement. Option C leverages an Application Load Balancer, which routes HTTP traffic but lacks native event-fan-out capabilities for background Lambda invocations. Option D introduces AWS Step Functions, which adds unnecessary orchestration overhead and couples the functions into a single workflow state machine rather than keeping them independent.
Community Comment Notes
Candidates overwhelmingly select option B, confirming that SNS subscriptions directly invoke Lambda functions as intended. One contributor provided exact AWS CLI commands to create the topic and subscribe the functions, highlighting the straightforward implementation [2]. Another user confirmed that this pattern eliminates custom routing logic, making it the most efficient design choice [1]. The community consensus firmly aligns with AWS documentation on decoupled serverless architectures.
Official Reference
- https://docs.aws.amazon.com/sns/latest/dg/sns-lambda.html
- https://docs.aws.amazon.com/lambda/latest/dg/services-sns.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When a question specifies concurrent, independent execution triggered by a single event, immediately consider SNS fan-out over SQS or Step Functions. Remember that SQS is for single-consumer or worker pool patterns, while SNS is designed for one-to-many asynchronous broadcasting.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
tomchandler077 👍 5B Given the requirements to concurrently call three independent third-party systems when there is a sale event, and ensuring that each Lambda function runs regardless of the success or failure of the others, the best solution is to use Amazon Simple Notification Service (SNS).
-
albert_kuo 👍 4 Answered B1. create sns topic aws sns create-topic --name SaleEvents 2. create three lambda function to subscribe sns topic aws sns subscribe --topic-arn arn:aws:sns:region:account-id:SaleEvents --protocol lambda --notification-endpoint arn:aws:lambda:region:account-id:function:Function1 aws sns subscribe --topic-arn arn:aws:sns:region:account-id:SaleEvents --protocol lambda --notification-endpoint arn:aws:lambda:region:account-id:function:Function2 aws sns subscribe --topic-arn arn:aws:sns:region:account-id:SaleEvents --protocol lambda --notification-endpoint arn:aws:lambda:region:account-id:function:Function3
-
siheom 👍 1 Answered BDefinitely B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →