4.2.2
| Question | Answer & Explanation |
|---|---|
| ### Question 1 - Troubleshooting SageMaker Endpoint Latency A machine learning team has deployed a real-time inference endpoint on Amazon SageMaker AI. Users are reporting intermittent high latency, but the overall CPU utilization remains consistently low. The team needs to isolate whether the bottleneck is in the data pre-processing logic or the actual model inference execution with the least operational overhead. Which tool should the team use to troubleshoot this issue? (Select ONE) - A) Use Amazon CloudWatch Metrics to monitor the CPUUtilization of the endpoint.- B) Enable AWS X-Ray tracing on the endpoint to capture execution segments for pre-processing and inference. - C) Deploy an Amazon SageMaker Processing job to analyze the endpoint's network traffic. - D) Use Amazon SageMaker Debugger to profile the latency of individual training loops. |
Correct Answer: B Correct Answer Analysis: - B is Correct: AWS X-Ray allows developers to instrument their application code to trace requests as they flow through different components. By defining custom sub-segments for data pre-processing and model inference, the team can precisely identify which step is causing the intermittent latency spikes, satisfying the requirement with minimal overhead. Distractor Analysis: - A is Incorrect: CloudWatch Metrics provides aggregate time-series data (like average CPU). Since CPU is already low, it won't isolate the specific code block causing the latency. - C is Incorrect: SageMaker Processing is used for data preparation and ETL workloads, not for analyzing live network traffic of a real-time inference endpoint. - D is Incorrect: SageMaker Debugger is designed to capture metrics and identify issues during the training phase (like gradient vanishing), not for real-time inference latency troubleshooting. > Exam Tip / AWS Best Practice: Use AWS X-Ray to trace requests across components and identify the exact sub-segment causing latency bottlenecks, while CloudWatch Metrics is better for aggregate system-level health checks. |
| ### Question 2 - Monitoring Bedrock Token Usage A GenAI engineering team is using Amazon Bedrock for an internal chat assistant. The team needs to monitor the token consumption per invocation to optimize costs and identify which application modules are generating the most tokens. The solution must require zero custom instrumentation code. Which AWS service natively provides these token metrics for analysis? (Select ONE) - A) AWS X-Ray - B) AWS Compute Optimizer - C) Amazon CloudWatch Metrics - D) Amazon Bedrock AgentCore Observability |
Correct Answer: C Correct Answer Analysis: - C is Correct: Amazon Bedrock automatically emits invocation metrics to Amazon CloudWatch, including InputTokenCount and OutputTokenCount. These metrics can be used to create dashboards and analyze token usage patterns without writing custom instrumentation code.Distractor Analysis: - A is Incorrect: AWS X-Ray is used for distributed tracing and latency analysis, not for tracking token consumption metrics natively. - B is Incorrect: AWS Compute Optimizer recommends optimal AWS compute resources based on utilization history; it does not track FM token usage. - D is Incorrect: While AgentCore Observability is useful for agents, it requires configuration and is specifically for tracing agent workflows (tool calls, memory). For basic FM invocation token metrics, CloudWatch is the native, zero-code solution. > Exam Tip / AWS Best Practice: Amazon Bedrock automatically sends token usage metrics ( InputTokenCount, OutputTokenCount) to CloudWatch, making it the primary tool for monitoring FM cost patterns without custom code. |
| ### Question 3 - Debugging Bedrock Agent Tool Invocations An AI engineering team has deployed an Amazon Bedrock Agent that invokes three different AWS Lambda functions as tools. The team has noticed that the agent occasionally takes too long to respond, and they need visibility into the execution time and success rate of each individual tool invocation per agent request. Which tool provides this specific distributed trace visibility? (Select ONE) - A) AWS CloudTrail - B) Amazon Bedrock AgentCore Observability - C) Amazon CloudWatch Logs Insights - D) AWS Trusted Advisor |
Correct Answer: B Correct Answer Analysis: - B is Correct: Amazon Bedrock AgentCore Observability is specifically designed to capture the internal operations of an agent invocation, including model inference calls, tool invocations (like Lambda functions), and memory operations. It provides the exact per-invocation trace visibility needed. Distractor Analysis: - A is Incorrect: AWS CloudTrail records API calls made in the account, which is useful for auditing, but it does not provide distributed tracing of an agent's internal execution flow. - C is Incorrect: CloudWatch Logs Insights is used for querying log data, but without a tracing mechanism, it cannot automatically correlate the execution time and success rate of multiple tools within a single agent request. - D is Incorrect: Trusted Advisor provides best practice checks across cost, performance, and security, not granular application tracing. > Exam Tip / AWS Best Practice: Use Amazon Bedrock AgentCore Observability when you need to trace the execution path of a Bedrock Agent, including its planning, tool calls, and synthesis steps, to identify which component is failing or causing latency. |
| ### Question 4 - Visualizing Multi-Component ML Pipelines A data engineering team has built an automated ML pipeline using AWS Step Functions. The pipeline orchestrates an AWS Glue ETL job, a SageMaker training step, and a SageMaker model deployment step. The team needs a visual service map of requests flowing through these components to quickly identify which step is failing or experiencing latency. Which tool is best suited for this requirement? (Select ONE) - A) AWS X-Ray - B) Amazon CloudWatch Logs - C) Amazon SageMaker Debugger - D) AWS Budgets |
Correct Answer: A Correct Answer Analysis: - A is Correct: AWS X-Ray provides a visual service map that shows the trace of requests as they move through different AWS services (like Glue, SageMaker, and Step Functions). This allows engineers to visually pinpoint the failing component or latency bottleneck. Distractor Analysis: - B is Incorrect: CloudWatch Logs stores log output from services, but it does not automatically generate a visual dependency map of requests across components without significant custom parsing. - C is Incorrect: SageMaker Debugger is used to debug ML training jobs (e.g., monitoring tensors), not for tracing the orchestration flow of a Step Functions pipeline. - D is Incorrect: AWS Budgets is a cost management tool, not a monitoring or tracing tool. > Exam Tip / AWS Best Practice: When you need a visual map of dependencies and request flows across multiple AWS services in an ML pipeline, enable AWS X-Ray tracing. |
| ### Question 5 - Analyzing RAG Pipeline Latency An enterprise RAG (Retrieval-Augmented Generation) application uses an AWS Lambda function to query an Amazon OpenSearch Serverless collection, and then passes the retrieved context to Amazon Bedrock for answer generation. Users are reporting query timeouts. The team needs to determine if the latency is originating from the OpenSearch retrieval or the Bedrock generation step. Which configuration provides the most accurate latency isolation? (Select ONE) - A) Enable Amazon CloudWatch Container Insights on the Lambda function. - B) Use AWS X-Ray tracing integrated across the Lambda function and the OpenSearch/Bedrock SDK calls. - C) Use Amazon Bedrock Guardrails to monitor the response time of the Bedrock model. - D) Configure VPC Flow Logs on the OpenSearch Serverless network interface. |
Correct Answer: B Correct Answer Analysis: - B is Correct: AWS X-Ray can be enabled on the Lambda function to trace the downstream SDK calls. X-Ray will automatically generate sub-segments for the OpenSearch query and the Bedrock InvokeModel API call, showing the exact duration spent in each step.Distractor Analysis: - A is Incorrect: CloudWatch Container Insights provides operational metrics (CPU, memory) for containerized workloads, not granular tracing of external API call latencies. - C is Incorrect: Bedrock Guardrails are used for content filtering and safety, not for latency monitoring. - D is Incorrect: VPC Flow Logs capture network traffic metadata, which cannot measure application-level API response times accurately. > Exam Tip / AWS Best Practice: For RAG architectures, AWS X-Ray is the ideal tool to trace the end-to-end request and measure the exact latency of the vector database retrieval versus the LLM generation. |
| ### Question 6 - Alerting on Endpoint Latency A retail company runs a SageMaker real-time endpoint for product recommendations. The SLA requires that the 95th percentile latency of invocations must not exceed 500 milliseconds over a 5-minute window. If it does, the operations team must be alerted immediately via an Amazon SNS topic. Which AWS service should be used to define this threshold and trigger the alert? (Select ONE) - A) AWS Budgets - B) Amazon CloudWatch Alarms - C) AWS X-Ray - D) Amazon EventBridge |
Correct Answer: B Correct Answer Analysis: - B is Correct: Amazon CloudWatch Alarms allows you to watch a single CloudWatch metric (like ModelLatency p95) over a specified time window (5 minutes) and trigger an action (such as sending a notification to an SNS topic) when the metric breaches a defined threshold (500 ms).Distractor Analysis: - A is Incorrect: AWS Budgets is used for cost and usage threshold alerts, not for operational performance metrics like latency. - C is Incorrect: AWS X-Ray traces requests but does not have a native feature to trigger SNS alerts based on aggregate percentile metrics over time. - D is Incorrect: Amazon EventBridge routes events, but it relies on a source (like a CloudWatch Alarm) to generate the alert based on time-series metric thresholds. > Exam Tip / AWS Best Practice: Use Amazon CloudWatch Alarms to monitor specific percentiles (e.g., p95, p99) of SageMaker latency metrics and trigger automated alerts or scaling policies. |
| ### Question 7 - Identifying Agent Retry Loops An Amazon Bedrock Agent is integrated with a custom API tool to fetch user data. Due to an API bug, the agent silently retries the tool call multiple times before returning an error to the user. The engineering team wants to monitor the agent's resource consumption pattern to identify these silent retry loops per invocation. Which tool is purpose-built to expose this behavior? (Select ONE) - A) Amazon CloudWatch Logs Insights - B) AWS Compute Optimizer - C) Amazon Bedrock AgentCore Observability - D) AWS Trusted Advisor |
Correct Answer: C Correct Answer Analysis: - C is Correct: Amazon Bedrock AgentCore Observability captures the detailed trace of a single agent invocation, including planning, tool invocations, and memory operations. It will explicitly show the repeated tool call attempts, exposing the retry loop. Distractor Analysis: - A is Incorrect: While logs might contain the error, querying CloudWatch Logs Insights won't provide a structured, per-invocation trace of the agent's internal retry logic without heavy custom parsing. - B is Incorrect: AWS Compute Optimizer recommends instance types based on resource utilization, having no visibility into agent logic. - D is Incorrect: Trusted Advisor checks for best practices, not application-specific retry loops. > Exam Tip / AWS Best Practice: When troubleshooting AI agents, an agent's resource consumption is amplified (one request = multiple calls). Use Bedrock AgentCore Observability to monitor per-invocation patterns and spot hidden retry loops. |
| ### Question 8 - Analyzing Custom Inference Logs A data science team has deployed a custom inference container on a SageMaker real-time endpoint. The container contains a complex pre-processing script, and the team needs to view detailed stack traces, variable values, and print() statement outputs generated during live invocations to debug an occasional data parsing failure.Which AWS service is designed to ingest and search this unstructured log data? (Select ONE) - A) Amazon CloudWatch Logs - B) AWS X-Ray - C) Amazon SageMaker Model Monitor - D) Amazon CloudWatch Metrics |
Correct Answer: A Correct Answer Analysis: - A is Correct: Amazon CloudWatch Logs natively ingests standard output (stdout) and standard error (stderr) from SageMaker containers. Engineers can use CloudWatch Logs Insights to search for specific strings, errors, or print statements to debug the parsing logic. Distractor Analysis: - B is Incorrect: AWS X-Ray is for tracing request paths and timing (segments), not for ingesting and searching raw application log text like print statements. - C is Incorrect: SageMaker Model Monitor analyzes data quality and model drift, not application code logs or stack traces. - D is Incorrect: CloudWatch Metrics stores numerical time-series data, not unstructured text logs. > Exam Tip / AWS Best Practice: For detailed application debugging (stack traces, print statements), rely on CloudWatch Logs. Use CloudWatch Metrics for numerical health checks and X-Ray for tracing request paths. |
| ### Question 9 - Monitoring Multi-Model Endpoint Memory A company hosts multiple models on a single SageMaker Multi-Model Endpoint (MME) to reduce costs. They need to monitor the system-level memory utilization of the underlying instance to ensure that dynamically loaded models are not causing Out-of-Memory (OOM) errors. The solution must require no custom code inside the containers. Which AWS service natively provides these system-level metrics? (Select ONE) - A) AWS Compute Optimizer - B) AWS X-Ray - C) Amazon Bedrock AgentCore Observability - D) Amazon CloudWatch Metrics |
Correct Answer: D Correct Answer Analysis: - D is Correct: SageMaker automatically collects system-level metrics, including CPUUtilization, MemoryUtilization, and DiskUtilization, for its endpoints and publishes them to Amazon CloudWatch Metrics natively, without requiring any custom code.Distractor Analysis: - A is Incorrect: AWS Compute Optimizer analyzes resource utilization over time to recommend optimal instance sizes, but it is not a real-time monitoring dashboard. - B is Incorrect: AWS X-Ray traces application requests, not system-level OS metrics like RAM usage. - C is Incorrect: AgentCore Observability is for Bedrock agents, not SageMaker Multi-Model Endpoints. > Exam Tip / AWS Best Practice: SageMaker endpoints automatically emit system-level metrics (CPU, Memory, Disk) and ML-specific metrics to CloudWatch. MME memory utilization is a critical metric to watch to prevent OOM errors as models load. |
| ### Question 10 - Ad-hoc Querying of Inference Failures A machine learning team wants to run ad-hoc queries against historical logs of failed model invocations from a SageMaker endpoint. They need to identify common patterns in the input JSON payloads that resulted in a 500 Internal Server Error over the past week. Which tool is the most appropriate for querying this log data efficiently? (Select ONE) - A) AWS X-Ray Analytics - B) Amazon CloudWatch Logs Insights - C) Amazon Bedrock AgentCore Observability - D) Amazon SageMaker Debugger |
Correct Answer: B Correct Answer Analysis: - B is Correct: Amazon CloudWatch Logs Insights enables engineers to interactively search and analyze log data. They can write query syntax to filter for 500 errors, parse the JSON payloads, and aggregate common patterns across the past week's logs. Distractor Analysis: - A is Incorrect: While X-Ray has analytics features, it focuses on trace analytics (latency, response times), not parsing raw log text payloads for HTTP error code patterns. - C is Incorrect: Bedrock AgentCore Observability is specific to Bedrock agents, not generic SageMaker endpoint invocation logs. - D is Incorrect: SageMaker Debugger is used for analyzing ML training metrics, not querying live inference logs. > Exam Tip / AWS Best Practice: Use CloudWatch Logs Insights for fast, interactive querying of your log data to find specific error codes, parse JSON payloads, and identify trends in application failures. |