Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

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: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Sarutobi
Highly Voted 1 year, 4 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 23 times
...
SuperDuperPooperScooper
Highly Voted 10 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 9 times
helloworldabc
3 weeks ago
just B
upvoted 1 times
...
mns0173
1 month, 1 week ago
there will just be a lag in scaling, but eventually this metric will scale as needed
upvoted 1 times
...
sonyaws
9 months, 3 weeks ago
makes sense
upvoted 1 times
...
jainparag1
9 months, 3 weeks ago
very good explanation. Moreover, go serverless as much as possible. EC2 vs Lambda - Lamda is always preferred.
upvoted 1 times
...
...
Syre
Most Recent 1 month 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 1 times
...
ChungFTF
1 month, 1 week 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 1 times
Linuslin
1 month ago
Dude, check you link again, which says "ApproximateNumberOfMessages" not " ApproximateAgeOfOldestMessage", so answer will be option A.
upvoted 2 times
...
...
tsangckl
1 month, 3 weeks ago
Selected Answer: B
B for sure
upvoted 1 times
...
vip2
2 months, 1 week ago
Selected Answer: B
I do think the B is correct way with ApproximateNumberOfMessages instead of ApproximateAgeOfOldestMessage. there is no such metric ...AgeOfOldestMessage
upvoted 1 times
...
Bobshaw
4 months, 2 weeks 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 1 times
...
seetpt
4 months, 2 weeks ago
Selected Answer: A
Vote for A
upvoted 2 times
...
seetpt
4 months, 2 weeks ago
A seems better. Dont really know.
upvoted 1 times
...
TonytheTiger
6 months 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 1 times
...
Dgix
6 months, 1 week 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 5 times
...
TheCloudGuruu
6 months, 4 weeks ago
Selected Answer: B
SQS with DLQ
upvoted 1 times
...
pri32
7 months, 1 week ago
Selected Answer: A
ApproximateAgeOfOldestMessage metric may not be as responsive as needed, and it doesn't directly address the requirement for handling processing errors by moving events to a separate queue for review.
upvoted 5 times
...
AimarLeo
7 months, 2 weeks ago
Selected Answer: B
The question typical AWS thrown words and leaving gaps.. but still going for B
upvoted 2 times
...
GoKhe
9 months ago
I would go with A. Scaling in/out based on message age does not align with what question asks i.e. it should be based on the number of events. So, B is not right here.
upvoted 4 times
07c2d2a
7 months, 3 weeks ago
Scaling based on how long someone is waiting is another way of basing it on the number of events, but I see what you mean. Lambda will scale based on the number 1:1 and B will scale in whatever configuration you want based on time, not number of events specifically.
upvoted 1 times
...
...
ayadmawla
9 months, 1 week ago
Selected Answer: B
Answer is B I would go with A, except a Dead Letter Q is not an SQS queue. There are only two types of SQS Queues, namely, Standard and FIFO. A DLQ is a special message queue (not SQS). See here for confirmation: https://aws.amazon.com/what-is/dead-letter-queue/#:~:text=A%20dead%2Dletter%20queue%20(DLQ)%20is%20a%20special%20type,communication%20in%20a%20distributed%20system.
upvoted 2 times
...
HappyPrince
9 months, 1 week ago
Selected Answer: A
I prefer A as the solution is serverless.
upvoted 4 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 ...