Recording and Alerting on SageMaker Endpoint API Call Events with CloudTrail and CloudWatch
A company has trained and deployed an ML model by using Amazon SageMaker. The company needs to implement a solution to record and monitor all the API call events for the SageMaker endpoint. The solution also must provide a notification when the number of API call events breaches a threshold. Which solution will meet these requirements?
Community Votes
82% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
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
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
Related Analysis
Practice All MLA-C01 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MLA-C01 Practice Test →