nerdexam
Amazon

DVA-C02 · Question #402

A company has an application that receives batches of orders from partners every day. The application uses an AWS Lambda function to process the batches. If a batch contains no orders, the Lambda func

The correct answer is A. Update the existing Lambda function's code to send an Amazon CloudWatch custom metric for C. Set up an Amazon CloudWatch alarm that will send a notification to the SNS topic when the value. Detecting an empty-batch condition in Lambda and notifying SNS with minimal effort is best achieved by publishing a custom CloudWatch metric from the function and triggering a CloudWatch alarm on that metric.

Submitted by asante_acc· Mar 5, 2026Monitoring and Troubleshooting

Question

A company has an application that receives batches of orders from partners every day. The application uses an AWS Lambda function to process the batches. If a batch contains no orders, the Lambda function must publish to an Amazon Simple Notification Service (Amazon SNS) topic as soon as possible. Which combination of steps will meet this requirement with the LEAST implementation effort? (Choose two.)

Options

  • AUpdate the existing Lambda function's code to send an Amazon CloudWatch custom metric for
  • BCreate a new Lambda function as an Amazon Kinesis data stream consumer. Configure the new
  • CSet up an Amazon CloudWatch alarm that will send a notification to the SNS topic when the value
  • DSchedule a new Lambda function to analyze Amazon CloudWatch metrics every 24 hours to
  • EModify the existing Lambda function to log orders to an Amazon Kinesis data stream.

How the community answered

(53 responses)
  • A
    64% (34)
  • B
    19% (10)
  • D
    6% (3)
  • E
    11% (6)

Why each option

Detecting an empty-batch condition in Lambda and notifying SNS with minimal effort is best achieved by publishing a custom CloudWatch metric from the function and triggering a CloudWatch alarm on that metric.

AUpdate the existing Lambda function's code to send an Amazon CloudWatch custom metric forCorrect

The existing Lambda function can call the CloudWatch PutMetricData API to publish a custom metric (e.g., EmptyBatchCount) whenever a batch contains no orders, requiring only a few lines of code.

BCreate a new Lambda function as an Amazon Kinesis data stream consumer. Configure the new

Creating a new Lambda function as a Kinesis consumer introduces unnecessary infrastructure and effort unrelated to the empty-batch detection requirement.

CSet up an Amazon CloudWatch alarm that will send a notification to the SNS topic when the valueCorrect

A CloudWatch alarm can be configured to trigger when the custom metric value exceeds 0 and directly publish to the SNS topic, completing the notification pipeline without any additional infrastructure or Lambda functions.

DSchedule a new Lambda function to analyze Amazon CloudWatch metrics every 24 hours to

Scheduling a function to analyze metrics every 24 hours violates the 'as soon as possible' requirement and adds unnecessary delay and implementation work.

EModify the existing Lambda function to log orders to an Amazon Kinesis data stream.

Logging orders to a Kinesis data stream adds significant implementation complexity and is not needed for a simple empty-batch notification.

Concept tested: CloudWatch custom metrics and alarms for Lambda event notification

Source: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice