exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 179 discussion

A solutions architect is designing a solution to process events. The solution must have the ability to scale in and out based on the number of events that the solution receives. If a processing error occurs, the event must move into a separate queue for review.

Which solution will meet these requirements?

  • A. Send event details to an Amazon Simple Notification Service (Amazon SNS) topic. Configure an AWS Lambda function as a subscriber to the SNS topic to process the events. Add an on-failure destination to the function. Set an Amazon Simple Queue Service (Amazon SQS) queue as the target.
  • B. Publish events to an Amazon Simple Queue Service (Amazon SQS) queue. Create an Amazon EC2 Auto Scaling group. Configure the Auto Scaling group to scale in and out based on the ApproximateAgeOfOldestMessage metric of the queue. Configure the application to write failed messages to a dead-letter queue.
  • C. Write events to an Amazon DynamoDB table. Configure a DynamoDB stream for the table. Configure the stream to invoke an AWS Lambda function. Configure the Lambda function to process the events.
  • D. Publish events to an Amazon EventBndge event bus. Create and run an application on an Amazon EC2 instance with an Auto Scaling group that is behind an Application Load Balancer (ALB). Set the ALB as the event bus target. Configure the event bus to retry events. Write messages to a dead-letter queue if the application cannot process the messages.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Sarutobi
Highly Voted 1 year, 9 months ago
Selected Answer: B
I would go with B just because of the wording. I believe A should work just fine, but the question asks for "scale in and out based on the number of events." In my opinion, that is what SNS->Lambda->SQS(DLQ) would do, too; I think the SNS->Lambda scale in/out behavior is more implicit. So I will go with B here because it is more explicit.
upvoted 29 times
...
SuperDuperPooperScooper
Highly Voted 1 year, 2 months ago
Selected Answer: A
Configuring scaling based on the age of the oldest message is nowhere near as good as scaling based on size of the Queue for this use case. age of the oldest message will grow linearly based on time. If there is a dramatic spike in the Queue size due to increased traffic, like 100X increase in size. Then the queue will have grown a lot but the oldest message will only increase in age linearly, so the scaling will not be able to realize how much the workload has increased.
upvoted 11 times
helloworldabc
5 months, 1 week ago
just B
upvoted 1 times
...
mns0173
6 months ago
there will just be a lag in scaling, but eventually this metric will scale as needed
upvoted 1 times
...
sonyaws
1 year, 2 months ago
makes sense
upvoted 1 times
...
jainparag1
1 year, 2 months ago
very good explanation. Moreover, go serverless as much as possible. EC2 vs Lambda - Lamda is always preferred.
upvoted 1 times
...
...
kylix75
Most Recent 1 week, 5 days ago
Selected Answer: B
The correct answer is B. Reasons: 1. SQS + Auto Scaling provides event-based scalability 2. ApproximateAgeOfOldestMessage metric enables workload-based scaling 3. SQS native dead-letter queue handles error messages 4. Most resilient and cost-effective solution for event processing at scale Issues with other options: A: SNS doesn't store messages for reprocessing C: DynamoDB Streams has scalability and retention limitations D: ALB + EC2 is more complex and expensive than serverless processing
upvoted 1 times
...
ahhatem
1 month, 2 weeks ago
Selected Answer: B
While A would probably work fine most of the time, B is more resilient. Once a message is in the Q, it will either be marked as complete or go to DLQ. In A, in edge cases like lambda exceeding concurrency limit, the message would be throttled after the SNS returns success to the sender.... Without SNS DLQ, the message would be lost.
upvoted 2 times
...
FZA24
3 months, 1 week ago
Selected Answer: B
scale in scale out => ALB a separate queue => DLQ
upvoted 3 times
...
Woody1848
3 months, 2 weeks ago
Selected Answer: A
• By sending event details to an Amazon SNS topic and configuring an AWS Lambda function as a subscriber, the solution automatically scales with the number of incoming events. • Lambda functions scale in and out based on the event load without manual intervention. • Adding an on-failure destination to the Lambda function that targets an Amazon SQS queue ensures that any processing errors move the event into a separate queue for review. • This setup meets both the scalability and error-handling requirements efficiently.
upvoted 2 times
...
Sin_Dan
3 months, 2 weeks ago
Selected Answer: B
Option A uses Lambda to process the solution. However, we don't know if the processing finishes within 15 mins or not. Also, SNS isn’t as well-suited for handling large event queues as SQS, and scaling based on message queue metrics is not supported in this configuration. So, the correct option is definitely B.
upvoted 2 times
...
Daniel76
3 months, 3 weeks ago
Selected Answer: B
Only B and D mention about reviewing error in a separate queue by dead letter Q, with D never use SQS where this is supported.
upvoted 2 times
...
Syre
5 months, 3 weeks ago
Selected Answer: B
People who are choosing A. Have you done associate level certs as this does not make any sense. You shouldnt be attempting this exam if that's how lost you are.
upvoted 2 times
amsf96
2 months, 2 weeks ago
chill bro
upvoted 2 times
...
...
ChungFTF
6 months ago
Selected Answer: B
The Auto Scaling group of EC2 instances can automatically adjust the number of instances based on the ApproximateAgeOfOldestMessage metric. This ensures that the solution scales dynamically with the volume of events, maintaining efficient processing. https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html
upvoted 2 times
Linuslin
5 months, 3 weeks ago
Dude, check you link again, which says "ApproximateNumberOfMessages" not " ApproximateAgeOfOldestMessage", so answer will be option A.
upvoted 3 times
...
...
tsangckl
6 months, 2 weeks ago
Selected Answer: B
B for sure
upvoted 2 times
...
vip2
7 months ago
Selected Answer: B
I do think the B is correct way with ApproximateNumberOfMessages instead of ApproximateAgeOfOldestMessage. there is no such metric ...AgeOfOldestMessage
upvoted 2 times
...
Bobshaw
9 months, 1 week ago
Selected Answer: B
publishing events to an SQS queue, creating an EC2 Auto Scaling group that scales based on the queue's ApproximateAgeOfOldestMessage metric, and configuring the application to write failed messages to a dead-letter queue provides a scalable, fault-tolerant, and cost-effective solution for event processing with the ability to handle processing errors separately.
upvoted 2 times
...
seetpt
9 months, 1 week ago
Selected Answer: A
Vote for A
upvoted 3 times
...
seetpt
9 months, 1 week ago
A seems better. Dont really know.
upvoted 1 times
...
TonytheTiger
10 months, 4 weeks ago
Selected Answer: B
Option B. Question states, " must move to into a separate queue for review" Dead-Letter queues give you this capability for debugging or troubleshooting the issue. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
upvoted 2 times
...
Dgix
11 months ago
Selected Answer: A
A fulfils all objectives. In B, ApproximateAgeOfOldestMessage doesn't translate to a reliable scaling pattern, and EC2s are implied. C does not implement a dead-letter queue D is overengineered.
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago