AWS Certified Developer – Associate / Question #936 of 557

Question #936

A developer is monitoring an AWS Lambda function configured to process real-time data. The developer has created a custom Amazon CloudWatch metric with a data granularity of 1 second to track the function's execution duration. If the function exceeds a specified threshold, the developer needs to receive an Amazon SNS notification within 20 seconds. What should the developer do to achieve this?

A

Create a high-resolution CloudWatch alarm.

B

Use Amazon CloudWatch Logs subscriptions.

C

Configure a standard-resolution CloudWatch alarm.

D

Enable AWS Lambda detailed monitoring.

Explanation

The correct answer is A because:

- High-resolution CloudWatch alarms (1-second or 10-second granularity) can evaluate metrics every 10 seconds, ensuring the SNS notification is sent within 20 seconds if the threshold is exceeded.
- Option B (CloudWatch Logs subscriptions) focuses on log data streaming, not metric-based alarms.
- Option C (standard-resolution alarm) uses 60-second evaluation periods, which is too slow for the 20-second requirement.
- Option D (Lambda detailed monitoring) increases built-in metric frequency to 1 second, but the question already specifies a custom metric with 1-second granularity, making this irrelevant.

Key Points:
- High-resolution alarms (1/10-second) are needed for sub-minute alerting.
- Standard alarms evaluate every 60 seconds.
- Custom metrics can have 1-second granularity regardless of Lambda's monitoring level.

Answer

The correct answer is: A