Recording and Alerting on SageMaker Endpoint API Call Events with CloudTrail and CloudWatch
Short answer
C CloudTrail records every SageMaker endpoint API call event, and a CloudWatch dashboard with an alarm provides the monitoring and threshold notification.
Question
Key Takeaways
CloudTrail captures every SageMaker InvokeEndpoint API call as a recordable event, while CloudWatch supplies the dashboard and the alarm; the CloudWatch Invocations metric alone counts calls but does not record the individual API call events.
After deploying a model with SageMaker, the company must record every API call event for the SageMaker endpoint, monitor them, and be notified when the number of calls breaches a threshold. The requirement combines an audit record of all invocation events with metric monitoring and threshold alerting.
Common mistake: Choosing only the CloudWatch Invocations metric. It does give an alarm on call volume, but it does not record the API call events themselves, and the question explicitly requires recording all of them.
Expert Analysis
Why the Answer Is Correct
The requirement has two halves: record all API call events for the SageMaker endpoint, and notify when the event count breaches a threshold. AWS CloudTrail logs the management API activity, including InvokeEndpoint calls, which satisfies the recording requirement with a full event history. Amazon CloudWatch then provides the dashboard for monitoring and the alarm for threshold notification, so option C is the only answer covering both halves. The vote was strong at 82 for C, and a4002bd highlighted that the company needs to record all events, with eesa describing the CloudTrail plus CloudWatch dashboard and alarm combination in detail.Why the Other Options Are Wrong
SageMaker Debugger with a custom rule (A) inspects model training and inference tensors and can report metrics, but it is built for debugging model internals rather than recording endpoint API call events, and rule-based thresholding on tensor metrics is not the same as counting API invocations. The tensor_variance built-in rule (B) is a specific statistical check on tensor values, so it has no relationship to API call volume and cannot serve as a threshold notification for endpoint traffic. The CloudWatch Invocations metric alone (D) does track invocation counts and can drive an alarm, but a metric is an aggregate number, not a record of the API call events, so it fails the explicit recording requirement that CloudTrail satisfies.Community Comment Notes
The community favored C overwhelmingly, 82 to 18. abrarjahin and lyndonZhao argued for D on the grounds that the Invocations metric is simpler and CloudTrail is not real time, but eesa and Saransundar answered that CloudWatch alarms can be driven from metrics derived on CloudTrail logs, satisfying both recording and notification. The dissent is a real design tradeoff about real-time versus recorded events, not a factual error in option C.Official Reference
https://docs.aws.amazon.com/sagemaker/latest/dg/logging-cloud-trail.html
This link opens the official vendor documentation in a new tab.
Community Votes
82% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
a4002bd 👍 6 Answered CI pick C. The company needs to implement a solution to record and monitor all the API call events for the SageMaker endpoint. Its needs to RECORD all events.
-
eesa 👍 1 Answered C✅ Breakdown of the correct answer: CloudTrail: Logs all SageMaker API calls, including InvokeEndpoint. Provides auditing and visibility into who called the endpoint, when, and with what parameters. Essential for tracking all invocation events (as required). CloudWatch Dashboard + Alarm: Use a CloudWatch dashboard to monitor invocation patterns and metrics. Set up an alarm based on metrics like the number of invocations (from CloudTrail logs or the Invocations metric) to trigger notifications when thresholds are breached.
-
eesa 👍 1 Answered CC. CloudTrail + CloudWatch dashboard + CloudWatch alarm ✅ Correcto. AWS CloudTrail captura todos los eventos de API, incluidas las invocaciones a endpoints de SageMaker (InvokeEndpoint). CloudWatch puede procesar estos logs para generar métricas personalizadas. Puedes usar un alarm de CloudWatch para notificar cuando el número de eventos supera un umbral. Esto cubre tanto registro como notificación
-
lyndonZhao 👍 1 Answered DCloudWatch Invocations metric: This metric tracks the number of API calls made to a SageMaker endpoint. By adding this metric to a CloudWatch dashboard and setting up an alarm, you can monitor the number of API calls and receive notifications when the threshold is breached.
-
Saransundar 👍 1 Answered CSageMaker endpoint API calls → Record with CloudTrail → Monitor metrics in CloudWatch → CloudWatch alarm for notifications
Show 1 more comment
-
abrarjahin 👍 1 Answered DCloud trail is not an option for real time solution
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All MLA-C01 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MLA-C01 Practice Test →