nerdexam
Amazon

SOA-C02 · Question #235

A company is supposed to receive a data file every hour in an Amazon S3 bucket. An S3 event notification invokes an AWS Lambda function each time a file arrives. The function processes the data for…

The correct answer is C. Create an Amazon CloudWatch alarm to publish a message to an Amazon Simple Notification. Option C is correct because CloudWatch can monitor the Lambda function's invocation count metric - if no file arrives in an hour, the Lambda is never triggered, the invocation count stays at zero, and a CloudWatch alarm on that metric publishes to an SNS topic to alert the…

Submitted by javi_es· Mar 30, 2026Monitoring, Logging, and Remediation

Question

A company is supposed to receive a data file every hour in an Amazon S3 bucket. An S3 event notification invokes an AWS Lambda function each time a file arrives. The function processes the data for use by an application. The application team notices that sometimes the file does not arrive. The application team wants to receive a notification whenever the file does not arrive. What is the MOST operationally efficient solution that meets these requirements?

Options

  • AAdd an S3 Lifecycle rule on the S3 bucket with a scope that is limited to objects that were created
  • BConfigure another S3 event notification to invoke a Lambda function that posts a message to an
  • CCreate an Amazon CloudWatch alarm to publish a message to an Amazon Simple Notification
  • DCreate a new Lambda function to get the timestamp of the newest file in the S3 bucket.

How the community answered

(52 responses)
  • A
    6% (3)
  • B
    4% (2)
  • C
    79% (41)
  • D
    12% (6)

Explanation

Option C is correct because CloudWatch can monitor the Lambda function's invocation count metric - if no file arrives in an hour, the Lambda is never triggered, the invocation count stays at zero, and a CloudWatch alarm on that metric publishes to an SNS topic to alert the team. This requires no custom code and leverages fully managed AWS services, making it the most operationally efficient solution.

Option A is wrong because S3 Lifecycle rules manage object expiration and storage transitions - they act on objects that exist, so they cannot detect the absence of an expected object.

Option B is wrong because S3 event notifications only fire when an event occurs (a file arrives) - they have no mechanism to detect when an expected event does not occur within a time window.

Option D is wrong because checking the newest file's timestamp via a custom Lambda requires additional infrastructure (a scheduled trigger, custom comparison logic, and notification wiring), making it far less operationally efficient than a native CloudWatch alarm.

Memory tip: The phrase "detect absence" is your CloudWatch alarm signal. Whenever an exam asks how to alert on something that didn't happen on a schedule, think CloudWatch metric alarm + SNS - because CloudWatch alarms fire on low/zero values just as easily as high values, which S3 event notifications fundamentally cannot do.

Topics

#CloudWatch Alarms#Lambda Functions#Monitoring#Notifications

Community Discussion

No community discussion yet for this question.

Full SOA-C02 Practice