Convert RDS storage autoscaling events into a CloudWatch custom metric with EventBridge and Lambda for the dashboard
A company has configured Amazon RDS storage autoscaling for its RDS DB instances. A DevOps team needs to visualize the autoscaling events on an Amazon CloudWatch dashboard. Which solution will meet this requirement?
Community Votes
85% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
RDS storage autoscaling events are delivered to EventBridge, so an EventBridge rule plus a Lambda that emits a CloudWatch custom metric is the direct path to a dashboard metric (A). Options B and D both rely on CloudTrail, but autoscaling events are not CloudTrail API-call records for these storage changes, so a metric filter would never match. Option C is also flawed because a CloudWatch alarm cannot be the target of an EventBridge rule; EventBridge targets are limited to services such as Lambda, SNS, SQS, Step Functions, ECS, and Events, and an alarm's status cannot be changed that way.
Amazon RDS publishes storage autoscaling events through Amazon EventBridge, not through CloudTrail, so the dashboard must be fed from those events. An EventBridge rule reacting to RDS storage autoscaling events invokes an AWS Lambda function that publishes a CloudWatch custom metric, and that custom metric is then visualized on the CloudWatch dashboard. This converts the autoscaling event stream into a metric the dashboard can chart.
Creating a CloudTrail trail with management or data events and a metric filter for autoscaling events (B and D) — auxwww noted that autoscaling operations are not logged by CloudTrail in a way that a metric filter would match, since RDS storage autoscaling surfaces as an EventBridge event rather than an API call record. Pointing the EventBridge rule at a CloudWatch alarm to change its status (C) — an EventBridge rule cannot target a CloudWatch alarm, so this wiring does not exist.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Amazon RDS emits storage autoscaling events to Amazon EventBridge. Creating an EventBridge rule that matches those events and targets an AWS Lambda function, where the function publishes a CloudWatch custom metric capturing the autoscaling activity, converts the event stream into a metric. That custom metric can then be rendered as a widget on a CloudWatch dashboard, which is what the requirement asks for. This is the standard event-to-metric pattern for surfacing RDS events on a dashboard.Why the Other Options Are Wrong
B creates a CloudTrail trail for management events, sends them to CloudWatch Logs, and builds a metric filter for the autoscaling events. RDS storage autoscaling is not captured as a CloudTrail management event in a form this metric filter would match, so nothing would be charted. D does the same thing with data events instead of management events, which is even less applicable since data events cover S3 object-level and similar data-plane operations, not RDS autoscaling. C creates an EventBridge rule targeting a CloudWatch alarm so the alarm's status changes, but an EventBridge rule cannot target a CloudWatch alarm; there is no such integration, so this design does not function. A is the correct answer.Community Comment Notes
Community voted A (85), with B a 15 percent minority. auxwww explicitly noted that autoscaling operations are not logged by AWS CloudTrail, which is the decisive objection to B and D. Shenannigan observed that both A and B would work only if the question had specified near real time and otherwise preferred B for simplicity, but trungtd and jamesf countered that the metric-filter approach via CloudTrail is indirect and complex compared with the EventBridge plus Lambda custom metric path.Official Reference
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →