QuestionQ84

VerifiedTroubleshooting and Optimization

A company is building a serverless application on AWS. The application uses an AWS Lambda function to process customer orders 24 hours a day, 7 days a week. The Lambda function calls an external vendor's HTTP API to process payments.

During load tests, a developer discovers that the external vendor payment processing API occasionally times out and returns errors. The company expects that some payment processing API calls will return errors.

The company wants the support team to receive notifications in near real time only when the payment processing external API error rate exceed 5% of the total number of transactions in an hour. Developers need to use an existing Amazon Simple Notification Service (Amazon SNS) topic that is configured to notify the support team.

Which solution will meet these requirements?

Explanation

Publishing custom metrics to CloudWatch enables real-time error rate monitoring. A CloudWatch alarm configured to trigger on the metric threshold notifies the SNS topic with low latency. This approach provides the near real-time notification required without the overhead of log processing, scheduled queries, or S3 storage.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!