3.3.5
| Question | Answer & Explanation |
|---|---|
| ### Question 1 - Event-Driven Retraining Triggers A financial services company is building an automated retraining pipeline for a credit risk prediction model using Amazon SageMaker Pipelines. New labeled training data arrives irregularly from a third-party vendor and is deposited into an Amazon S3 bucket. The machine learning engineering team wants to trigger the retraining pipeline immediately when the data arrives with the least operational overhead. Which solution meets these requirements? (Select ONE) - A) Configure an S3 Event Notification to invoke an AWS Lambda function, which then makes an API call to StartPipelineExecution.- B) Use Amazon EventBridge to monitor S3 ObjectCreated events and target the Amazon SageMaker Pipeline execution API directly.- C) Configure an Amazon EventBridge scheduled rule to run a daily check on the S3 bucket's object count and trigger the pipeline if new objects exist. - D) Use AWS Step Functions to poll the S3 bucket every 5 minutes using a Wait state and trigger the SageMaker Pipeline. |
Correct Answer: B Correct Answer Analysis: Amazon EventBridge can natively capture Amazon S3 event notifications (such as ObjectCreated) and route them to various AWS services. By setting the SageMaker Pipeline as the target for the EventBridge rule, the pipeline triggers automatically and immediately upon data arrival. This approach requires no custom compute code and provides the lowest operational overhead.Distractor Analysis: - A is Incorrect: While S3 Event Notifications can invoke Lambda, writing and maintaining a custom Lambda function solely to call the SageMaker API introduces unnecessary operational overhead compared to a direct EventBridge integration. - C is Incorrect: A daily scheduled rule introduces latency (up to 24 hours) before retraining occurs, violating the requirement for immediate triggering upon data arrival. - D is Incorrect: Polling S3 with Step Functions every 5 minutes is an anti-pattern that introduces unnecessary complexity, higher costs, and delayed triggering compared to event-driven architecture. > Exam Tip: For irregular events (like S3 data drops), use EventBridge to trigger SageMaker Pipelines directly. For predictable cadences, use EventBridge Scheduler. |
| ### Question 2 - Model Registry Approval Integration A healthcare AI team has configured an unattended SageMaker Pipeline to retrain a medical diagnosis model whenever new validated data is available. Compliance policies strictly mandate that no model can be deployed to a production endpoint without a human medical expert reviewing the evaluation metrics and explicitly approving the release. Which step should be integrated at the end of the SageMaker Pipeline to fulfill this requirement? (Select ONE) - A) A ModelStep that registers the model into the SageMaker Model Registry with a PendingManualApproval status.- B) A ConditionStep that deploys the model to a staging endpoint and sends an Amazon SNS notification for manual review.- C) A LambdaStep that automatically deploys the model to production if the validation accuracy exceeds 0.95.- D) A RegisterModelStep that saves the model artifacts to Amazon S3 and updates a tracking server in MLflow. |
Correct Answer: A Correct Answer Analysis: The ModelStep in Amazon SageMaker Pipelines can be configured to register a trained model into the SageMaker Model Registry. By setting the ModelApprovalStatus parameter to PendingManualApproval, the pipeline will halt the automated deployment process, ensuring the model waits in the registry until a human reviewer manually evaluates the metrics and changes the status to Approved.Distractor Analysis: - B is Incorrect: While sending an SNS notification for manual review is plausible, deploying to a staging endpoint within the same pipeline step does not explicitly prevent an automated downstream CI/CD pipeline from accidentally moving it to production without the formal registry approval gate. - C is Incorrect: Automatically deploying to production based on a metric threshold violates the strict compliance mandate requiring explicit human approval. - D is Incorrect: Simply saving artifacts to S3 and logging to MLflow does not establish a formal, immutable approval gate that downstream CI/CD deployment pipelines can reference. > Exam Tip: Always end a retraining pipeline at the Model Registry ( PendingManualApproval) to separate training orchestration from deployment approval. |
| ### Question 3 - Scheduled Retraining for Predictable Drift A large e-commerce platform observes predictable, weekly drift in their product recommendation model due to weekend flash sales. The data science team wants to automate the retraining of this model every Sunday at 2:00 AM UTC to capture the previous week's data, requiring minimal infrastructure management. Which AWS service configuration is the most appropriate to trigger the retraining pipeline? (Select ONE) - A) Deploy an Amazon EC2 instance with a cron job that runs a Python script to trigger the SageMaker Pipeline. - B) Create an AWS Lambda function triggered by an Amazon EventBridge scheduled rule (cron expression) that invokes the SageMaker Pipeline. - C) Create an Amazon EventBridge scheduler rule using a cron expression that directly targets the SageMaker StartPipelineExecution API.- D) Use AWS Step Functions with a Wait state configured for 1 week, transitioning to a Task state that triggers the pipeline. |
Correct Answer: C Correct Answer Analysis: Amazon EventBridge Scheduler allows you to create, run, and manage scheduled tasks using cron expressions without needing to provision or manage underlying compute resources. By directly targeting the SageMaker Pipeline execution API, the solution provides a fully serverless, low-operational-overhead trigger that reliably runs on a fixed cadence. Distractor Analysis: - A is Incorrect: Running an EC2 instance solely to execute a cron job for a weekly trigger introduces massive unnecessary operational overhead and cost. - B is Incorrect: While an EventBridge rule triggering Lambda works, using a Lambda function as a middleman just to call the SageMaker API is redundant when EventBridge can target the API directly. - D is Incorrect: Step Functions are designed for orchestrating multi-step workflows, not for acting as long-term cron schedulers. A 1-week Wait state is an anti-pattern that wastes resources and is fragile across state machine executions.> Exam Tip: Use EventBridge Scheduler for time-based triggers and EventBridge Event Bus for event-based triggers. Both can target SageMaker APIs directly without Lambda. |
| ### Question 4 - Parameterizing Retraining Pipelines A data engineering team is building a reusable retraining pipeline in Amazon SageMaker Pipelines. The pipeline must be able to process different datasets (e.g., Q1 data, Q2 data) located in different Amazon S3 prefixes without requiring the data scientist to modify the underlying pipeline JSON definition for each run. The team wants to ensure repeatability and auditability of the data used in each run. How should the pipeline be configured? (Select ONE) - A) Hardcode the S3 URI in the ProcessingStep code and clone the pipeline for each quarter.- B) Define a PipelineParameter for the S3 input data location and pass the specific URI at execution time.- C) Use a Python SDK script that dynamically searches for the newest folder in the S3 bucket at runtime. - D) Store the S3 URI in an AWS Systems Manager Parameter Store key and fetch it dynamically inside the processing container. |
Correct Answer: B Correct Answer Analysis: Defining a PipelineParameter in SageMaker Pipelines allows the pipeline definition to remain static and version-controlled, while the specific inputs (like the S3 data location) can be dynamically passed as arguments during the StartPipelineExecution API call. This ensures the exact data URI used for each run is recorded in the pipeline execution history for auditing.Distractor Analysis: - A is Incorrect: Hardcoding URIs and cloning pipelines violates the principle of repeatability and creates an operational nightmare for pipeline maintenance. - C is Incorrect: Dynamically searching for the newest folder introduces ambiguity and makes it difficult to audit exactly which data was used, violating the auditability constraint. - D is Incorrect: While fetching from Parameter Store is possible, it adds unnecessary latency and complexity to the container startup compared to passing parameters natively through the SageMaker Pipelines execution interface. > Exam Tip: Use Pipeline Parameters to pass runtime variables (like S3 paths or instance types) to static pipeline definitions for reproducible ML workflows. |
| ### Question 5 - Drift Detection Triggering Retraining An autonomous vehicle company is monitoring a SageMaker real-time inference endpoint for model quality degradation. When the model's prediction accuracy drops below an acceptable threshold (e.g., due to changes in road conditions), the team wants to automatically trigger a retraining pipeline that fetches the most recent ground-truth labels from their feature store. Which AWS native mechanism should be used to automate this retraining trigger? (Select ONE) - A) Amazon SageMaker Model Monitor paired with an Amazon CloudWatch Alarm that triggers an Amazon EventBridge rule to start the pipeline. - B) Amazon CloudWatch Logs Insights configured to parse endpoint logs and execute an AWS Lambda function that retrains the model. - C) AWS CloudTrail monitoring for API calls to the inference endpoint, triggering an AWS Step Functions workflow. - D) Amazon SageMaker Clarify processing jobs scheduled hourly to evaluate bias, which subsequently triggers CodePipeline. |
Correct Answer: A Correct Answer Analysis: Amazon SageMaker Model Monitor continuously analyzes endpoint traffic and prediction outputs. If data drift or model quality degradation breaches a defined constraint, it emits a metric. An Amazon CloudWatch Alarm can be configured to watch this metric, which then triggers an Amazon EventBridge rule to automatically invoke the SageMaker Pipeline execution API for retraining. Distractor Analysis: - B is Incorrect: Writing custom CloudWatch Logs Insights queries to parse raw logs for model accuracy is highly complex, brittle, and does not natively compare predictions against ground truth like Model Monitor does. - C is Incorrect: CloudTrail monitors control-plane API actions (e.g., InvokeEndpoint calls) for security auditing, not the data-plane payload or model accuracy metrics.- D is Incorrect: SageMaker Clarify is used for pre-training bias detection and post-training explainability, not for continuous production endpoint monitoring or triggering retraining based on accuracy drops. > Exam Tip: SageMaker Model Monitor detects drift, CloudWatch Alarm catches the breach, and EventBridge triggers the SageMaker Pipeline for retraining. |
| ### Question 6 - Experiment Tracking and Lineage A pharmaceutical research team is executing automated retraining jobs for a drug-discovery model. They need to maintain strict lineage for FDA compliance. The solution must automatically track all hyperparameters, metrics, and artifacts for every unattended pipeline run, and seamlessly register the validated model into the SageMaker Model Registry. Which AWS service integration provides this capability with the least operational overhead? (Select ONE) - A) Use AWS CloudTrail to log all CreateTrainingJob API calls and manually export metrics to Amazon S3.- B) Integrate Amazon SageMaker MLflow tracking server into the pipeline to log runs and automatically register the model artifact to the registry. - C) Configure an AWS Lambda function to write hyperparameters to an Amazon DynamoDB table upon pipeline completion. - D) Use Amazon CloudWatch Metrics to record custom hyperparameters and link them to the SageMaker Model Registry. |
Correct Answer: B Correct Answer Analysis: MLflow on Amazon SageMaker AI provides a managed tracking server that automatically captures parameters, metrics, and artifacts during pipeline runs. It integrates natively with the SageMaker Model Registry, allowing data scientists to automatically register a model version directly from an MLflow run, preserving complete lineage from the experiment to the registered model version. Distractor Analysis: - A is Incorrect: CloudTrail logs API management events (like who started the job) but does not capture the internal hyperparameters, evaluation metrics, or artifacts of the ML training process. - C is Incorrect: Writing custom Lambda code to store parameters in DynamoDB requires significant development overhead and does not natively link artifacts to the Model Registry with strict lineage. - D is Incorrect: CloudWatch Metrics is a time-series monitoring service and is not designed to store complex ML artifacts or maintain structural lineage to the Model Registry. > Exam Tip: Use MLflow on SageMaker AI for automated experiment tracking and seamless registration of runs to the Model Registry. |
| ### Question 7 - CI/CD for Retraining Code A machine learning engineering team frequently updates the Python retraining scripts ( train.py) stored in an AWS CodeCommit repository. The operations team requires that whenever new code is pushed, an automated CI/CD pipeline runs unit tests on the script. If the tests pass, the pipeline should automatically trigger the SageMaker retraining pipeline using the updated script. The architecture must minimize manual intervention.Which AWS services should be orchestrated to achieve this? (Select ONE) - A) Use AWS CodePipeline to monitor CodeCommit, AWS CodeBuild to run unit tests, and an Amazon EventBridge rule to trigger the SageMaker Pipeline. - B) Use AWS CodeDeploy to deploy the train.py script to an EC2 instance, which then runs the SageMaker training job locally.- C) Use AWS CodePipeline to monitor CodeCommit and directly invoke the SageMaker CreateTrainingJob API from the source stage.- D) Use Amazon EventBridge to monitor CodeCommit, trigger an AWS Lambda function to run tests, and call the SageMaker Pipeline. |
Correct Answer: A Correct Answer Analysis: AWS CodePipeline can natively use AWS CodeCommit as a source. AWS CodeBuild can be configured as a build stage to execute unit tests. Upon successful build completion, CodePipeline can trigger an Amazon EventBridge rule (or use a Lambda action/SageMaker action) to start the SageMaker Pipeline, ensuring the infrastructure-as-code and ML orchestration are cleanly separated. Distractor Analysis: - B is Incorrect: CodeDeploy is designed for deploying applications to compute targets (EC2, ECS, Lambda), not for running unit tests on Python scripts or orchestrating managed SageMaker training jobs. - C is Incorrect: Directly invoking CreateTrainingJob from the source stage skips the required unit testing phase, violating the CI/CD requirement.- D is Incorrect: Using a Lambda function to run unit tests is an anti-pattern due to execution time limits and lack of native testing environment capabilities compared to CodeBuild. > Exam Tip: AWS CodePipeline and CodeBuild handle the software CI/CD (code tests), while SageMaker Pipelines handle the ML orchestration (training/registration). They meet at an EventBridge handoff. |
| ### Question 8 - RAG Knowledge Base Re-indexing A legal tech company uses an Amazon Bedrock Knowledge Base backed by an Amazon OpenSearch Serverless vector store to search through millions of case files. The engineering team has decided to switch the embedding model from a smaller model to a higher-dimension, more accurate model to improve search relevance. They need to update the vector index with the least operational overhead while ensuring all queries return accurate results. What must the team do to fulfill this requirement? (Select ONE) - A) Perform an incremental resync on the Bedrock Knowledge Base, as it will only update documents that have changed in the S3 data source. - B) Copy the existing OpenSearch Serverless index to a new collection, then point the Bedrock Knowledge Base to the new collection. - C) Start a full ingestion job in the Bedrock Knowledge Base to re-process all documents from the S3 data source using the new embedding model. - D) Update the Bedrock Knowledge Base configuration with the new embedding model; OpenSearch Serverless will automatically re-embed existing vectors in the background. |
Correct Answer: C Correct Answer Analysis: Changing the embedding model alters the dimensions and semantics of the resulting vectors. All existing documents must be re-parsed, re-chunked, and re-embedded using the new model. Starting a full ingestion job via the Bedrock Knowledge Base StartIngestionJob API will completely regenerate the vectors in the OpenSearch Serverless index based on the new embedding configuration.Distractor Analysis: - A is Incorrect: An incremental resync checks for S3 document changes (additions/modifications/deletions). Since the S3 documents haven't changed, an incremental resync will skip them, leaving the old, incompatible vectors in the index. - B is Incorrect: Copying the index merely duplicates the existing vectors (which were generated by the old embedding model). It does not regenerate them. - D is Incorrect: OpenSearch Serverless is a vector database; it cannot retroactively re-embed text into vectors using a newly specified model. It only stores and queries existing vectors. > Exam Tip: Changing chunking strategy, embedding model, or vector dimensions requires a full re-ingestion of the data source, not an incremental resync. |
| ### Question 9 - Automatic Rollback for Retrained Models A retail company has automated their retraining pipeline to deploy new model versions to a SageMaker real-time endpoint. They want to shift 20% of traffic to the newly retrained model, monitor the error rate for 10 minutes, and automatically revert to the previous version if the error rate exceeds 2%. The team wants to achieve this with zero custom infrastructure management for the traffic shifting logic. Which feature should the engineering team implement? (Select ONE) - A) Configure a custom AWS Lambda function to route 20% of API Gateway traffic to the new endpoint variant, then monitor CloudWatch alarms. - B) Use Amazon SageMaker Inference Recommender to automatically test the endpoint under load and rollback if error rates spike. - C) Implement Amazon SageMaker Deployment Guardrails with a canary traffic shift and an automatic rollback configuration linked to a CloudWatch Alarm. - D) Deploy the new model to a new SageMaker endpoint and use Amazon Route 53 weighted routing to shift 20% of traffic. |
Correct Answer: C Correct Answer Analysis: Amazon SageMaker Deployment Guardrails natively support blue/green deployments with canary traffic shifting. By configuring an AutoRollbackConfig linked to a CloudWatch Alarm (monitoring Invocation5XXErrors), SageMaker will automatically shift traffic back to the blue (original) fleet if the alarm trips during the baking period, all managed natively within SageMaker without custom routing logic.Distractor Analysis: - A is Incorrect: Writing custom Lambda functions to manually route traffic introduces high operational overhead and violates the zero-infrastructure-management constraint. - B is Incorrect: SageMaker Inference Recommender is used to benchmark endpoint performance and recommend instance types, not to manage production traffic shifting or rollback. - D is Incorrect: Using Route 53 weighted routing across multiple endpoints requires managing multiple endpoints manually and lacks the automatic, metric-driven rollback logic native to SageMaker Deployment Guardrails. > Exam Tip: Use SageMaker Deployment Guardrails for native blue/green deployments (canary/linear) and link CloudWatch Alarms to AutoRollbackConfig for automated rollbacks. |
| ### Question 10 - Securing Retraining Pipeline Triggers An enterprise ML team is building an automated retraining pipeline in Amazon SageMaker. The retraining code and pipeline definition are stored in a third-party Git repository (GitHub Enterprise). The pipeline must be triggered automatically when code is merged to the main branch, but compliance policies strictly prohibit storing static Git credentials (like Personal Access Tokens) in AWS services or pipeline definitions.Which AWS service should be used to securely connect the AWS pipeline to the third-party repository? (Select ONE) - A) AWS CodeConnections - B) AWS CodeCommit - C) AWS Secrets Manager - D) AWS IAM Identity Center |
Correct Answer: A Correct Answer Analysis: AWS CodeConnections (formerly AWS CodeStar Connections) creates a managed, secure connection between AWS services (like CodePipeline or EventBridge) and third-party Git repositories. It uses an OAuth or GitHub App-based handshake mechanism, eliminating the need to store static Personal Access Tokens (PATs) in the pipeline definition or AWS Secrets Manager. Distractor Analysis: - B is Incorrect: AWS CodeCommit is AWS's native managed Git service, not a tool for connecting to external third-party repositories. - C is Incorrect: While Secrets Manager can store a PAT, retrieving it to authenticate pipeline runs would violate the compliance policy that explicitly prohibits storing static Git credentials. - D is Incorrect: AWS IAM Identity Center is used for federated workforce access to AWS accounts and applications, not for linking CI/CD pipelines to source code repositories. > Exam Tip: Use AWS CodeConnections to integrate AWS CI/CD pipelines with external Git providers (GitHub, GitLab, Bitbucket) without managing static credentials. |