AWS Certified Solutions Architect - Associate / Question #1588 of 1019

Question #1588

An Amazon EventBridge rule is configured to invoke an AWS Lambda function when specific events occur. The Lambda function has not executed despite the expected events being generated. A solutions architect needs to confirm whether the rule is triggering correctly and if the target Lambda function is being invoked. Which solution will fulfill these requirements?

A

Check for metrics in Amazon CloudWatch in the namespace for AWS/Events.

B

Review events in the Amazon Simple Notification Service (Amazon SNS) dead-letter queue.

C

Inspect the Amazon CloudWatch Logs for the Lambda function's execution logs.

D

Analyze AWS CloudTrail logs for EventBridge API activity.

Explanation

The correct answer is A because:
- Option A: Amazon EventBridge automatically sends metrics to CloudWatch under the AWS/Events namespace. These metrics include TriggeredRules (number of times a rule matched an event), InvokedTargets (number of times a target was invoked), and FailedInvocations (failed attempts to invoke a target). By checking these metrics, the solutions architect can confirm if the rule is triggering (via TriggeredRules) and if the Lambda function is being invoked (via InvokedTargets or FailedInvocations).

- Option B: SNS dead-letter queues (DLQs) are irrelevant here unless the Lambda function is explicitly configured with a DLQ. The question does not mention SNS or DLQs, so this option does not address the core issue.
- Option C: Lambda execution logs in CloudWatch only show logs if the function is invoked. If the rule is not triggering, there would be no logs to inspect, making this insufficient to confirm rule activity.
- Option D: CloudTrail logs API activity but does not track EventBridge event routing. It would only show administrative changes to the rule, not whether events triggered it.

Key Points:
- Use CloudWatch metrics (AWS/Events) to monitor EventBridge rule activity and target invocations.
- Lambda logs only exist if the function is invoked, so they cannot confirm rule triggering.
- Dead-letter queues and CloudTrail are unrelated to EventBridge event delivery diagnostics in this scenario.

Answer

The correct answer is: A