Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 (?) , you can switch to a simple comment.
Switch to a voting comment New
Sarutobi
Highly Voted 1 year, 6 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 26 times
...
SuperDuperPooperScooper
Highly Voted 12 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 10 times
helloworldabc
2 months, 2 weeks ago
just B
upvoted 1 times
...
mns0173
3 months, 1 week ago
there will just be a lag in scaling, but eventually this metric will scale as needed
upvoted 1 times
...
sonyaws
11 months, 3 weeks ago
makes sense
upvoted 1 times
...
jainparag1
11 months, 2 weeks ago
very good explanation. Moreover, go serverless as much as possible. EC2 vs Lambda - Lamda is always preferred.
upvoted 1 times
...
...
FZA24
Most Recent 2 weeks ago
Selected Answer: B
scale in scale out => ALB a separate queue => DLQ
upvoted 2 times
...
Woody1848
3 weeks, 1 day 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 1 times
...
Sin_Dan
3 weeks, 4 days 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 1 times
...
Daniel76
1 month 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 1 times
...
Syre
3 months 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
3 months, 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
3 months ago
Dude, check you link again, which says "ApproximateNumberOfMessages" not " ApproximateAgeOfOldestMessage", so answer will be option A.
upvoted 2 times
...
...
tsangckl
3 months, 3 weeks ago
Selected Answer: B
B for sure
upvoted 1 times
...
vip2
4 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
6 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 1 times
...
seetpt
6 months, 2 weeks ago
Selected Answer: A
Vote for A
upvoted 3 times
...
seetpt
6 months, 2 weeks ago
A seems better. Dont really know.
upvoted 1 times
...
TonytheTiger
8 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
8 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 6 times
...
TheCloudGuruu
8 months, 3 weeks ago
Selected Answer: B
SQS with DLQ
upvoted 1 times
...
pri32
9 months 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
...
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 ...