exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 18 discussion

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?

  • A. Write the results of payment processing API calls to Amazon CloudWatch. Use Amazon CloudWatch Logs Insights to query the CloudWatch logs. Schedule the Lambda function to check the CloudWatch logs and notify the existing SNS topic.
  • B. Publish custom metrics to CloudWatch that record the failures of the external payment processing API calls. Configure a CloudWatch alarm to notify the existing SNS topic when error rate exceeds the specified rate.
  • C. Publish the results of the external payment processing API calls to a new Amazon SNS topic. Subscribe the support team members to the new SNS topic.
  • D. Write the results of the external payment processing API calls to Amazon S3. Schedule an Amazon Athena query to run at regular intervals. Configure Athena to send notifications to the existing SNS topic when the error rate exceeds the specified rate.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Bibay
Highly Voted 1 year, 8 months ago
Selected Answer: B
B. Publish custom metrics to CloudWatch that record the failures of the external payment processing API calls. Configure a CloudWatch alarm to notify the existing SNS topic when the error rate exceeds the specified rate is the best solution to meet the requirements. With CloudWatch custom metrics, developers can publish and monitor custom data points, including the number of failed requests to the external payment processing API. A CloudWatch alarm can be configured to notify an SNS topic when the error rate exceeds the specified rate, allowing the support team to be notified in near real-time. Option A is not optimal since it involves scheduling a Lambda function to check the CloudWatch logs. Option C may not provide the desired functionality since it does not specify a rate at which to notify the support team. Option D is more complex than necessary, as it involves writing the results to S3 and configuring an Athena query to send notifications to an SNS topic.
upvoted 14 times
...
Untamables
Highly Voted 1 year, 9 months ago
Selected Answer: B
The correct answer is B. You can use the Embedded Metrics format to embed custom metrics alongside detailed log event data. CloudWatch automatically extracts the custom metrics so you can visualize and alarm on them, for real-time incident detection. https://docs.aws.amazon.com/lambda/latest/operatorguide/custom-metrics.html
upvoted 6 times
...
sumanshu
Most Recent 2 weeks, 1 day ago
Selected Answer: B
A) Eliminated - Requires manual log queries and a custom Lambda function to process logs, introducing operational overhead. B) Correct - CloudWatch Alarms can calculate error rates using metric math and automatically notify the SNS topic. C) Eliminated - This approach notifies the support team for every API failure, not just when the error rate exceeds 5%. D) Eliminated - Adds significant operational complexity (managing S3 storage, Athena queries, and scheduling).
upvoted 1 times
...
trieudo
3 weeks, 2 days ago
Selected Answer: B
keyword: error rate exceed 5%, receive notifications in near real time ==> discard A,: use lamdba or athena with schedule, violate ' receive notifications in near real time ' ==> discard C: die in spam of message if any, and don't know when error up 5% B is most good solution: CloudWatch Alarm can calculate 5% with setup, and notify righ away when reach thresold set-up
upvoted 1 times
...
rue_
2 months, 1 week ago
Selected Answer: B
It's B, allows you to customize the metrics as required in the question, and sends notification in near real time instead of polling
upvoted 1 times
...
65703c1
7 months, 2 weeks ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
Tony88
1 year, 4 months ago
Selected Answer: B
Require "near real-time" notification, so you should not use scheduled solution. Creating a new SNS topic is no sense.
upvoted 2 times
Ponyi
1 year, 2 months ago
In the question, it is also mentioned that "Developer needs to use the existing SNS topic...."
upvoted 1 times
...
...
jayvarma
1 year, 4 months ago
Option B. Using custom metrics, Developers will be able to publish and monitor custom data points such as the no. of failed requests to the external payment processing API. Create a CloudWatch alarm and configure it to be triggered when the rate of error exceeds the specified number in the question.
upvoted 1 times
...
svrnvtr
1 year, 9 months ago
Selected Answer: B
It is B
upvoted 3 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