By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Topic: IAM, VPC, Encryption, CloudWatch, SageMaker Model Monitor
Security and monitoring are the backbone of any production-grade ML pipeline. Imagine a real-time fraud detection system processing millions of transactions daily: sensitive customer data flows from Kinesis to SageMaker endpoints, while compliance mandates encryption at rest and in transit, least-privilege IAM roles, and real-time drift detection to flag model degradation. Without proper security, you risk data breaches; without monitoring, models silently fail, costing millions in false positives/negatives. This guide covers how AWS secures ML workloads and ensures models stay reliable post-deployment.
"sagemaker:InvokeEndpoint"
Scenario: Deploy a fraud detection model with strict compliance requirements (e.g., PCI-DSS).1. Create a VPC with private subnets (no public IPs) and a NAT gateway for outbound internet access (e.g., to download Python packages).2. Configure a VPC endpoint for SageMaker to avoid public internet exposure.3. Encrypt data at rest: - Enable SSE-KMS for S3 (training data) and EBS (notebook instances). - Use KMS CMKs with key policies restricting access to IAM roles.4. Encrypt data in transit: - Attach an ACM certificate to the SageMaker endpoint for HTTPS. - Enforce TLS 1.2+ in the endpoint configuration.5. Restrict IAM permissions: - Create a role with "sagemaker:InvokeEndpoint" and "kms:Decrypt" for the client application. - Deny all other actions (e.g., "sagemaker:DeleteEndpoint").6. Enable Model Monitor: - Schedule hourly drift detection with CloudWatch alarms for FeatureDrift > 0.1. - Configure SNS to notify the security team if drift exceeds thresholds.
"kms:Decrypt"
"sagemaker:DeleteEndpoint"
FeatureDrift
Scenario: A recommendation model’s accuracy drops after a feature schema change.1. Set up SageMaker Model Monitor: - Create a baseline from training data (e.g., DataCaptureConfig for input/output logs). - Schedule daily jobs to compare live traffic against the baseline.2. Configure CloudWatch alarms: - Trigger for ModelLatency > 100ms or InvocationsErrors > 5%. - Integrate with Lambda to auto-rollback to a previous model version.3. Run bias detection with Clarify: - Post-deployment, analyze predictions for demographic bias (e.g., gender skew in recommendations). - Log results to CloudWatch for auditing.4. Audit access with CloudTrail: - Filter logs for "sagemaker:InvokeEndpoint" to track who called the model. - Set up a CloudWatch Logs Insights query to detect anomalous invocation patterns.
DataCaptureConfig
ModelLatency > 100ms
InvocationsErrors > 5%
"sagemaker:CreateTrainingJob"
VPC vs. No VPC: SageMaker endpoints can run without a VPC (public internet access), but the exam will test when a VPC is required (e.g., for PCI-DSS compliance).
Model Monitor Constraints:
The exam may ask: "How do you detect drift in a batch inference job?" (Answer: Use SageMaker Processing Jobs with custom scripts.)
CloudWatch vs. Model Monitor:
The exam may ask: "Which service detects prediction skew?" (Answer: Model Monitor + Clarify.)
Key Parameter Defaults:
Explanation: VPC endpoints ensure private network access, SSE-KMS encrypts data at rest, and ACM provides TLS for in-transit encryption.
A data scientist notices that a fraud detection model’s accuracy dropped after a feature schema change. Which service should they use to detect this issue in real time?
Explanation: Model Monitor detects data drift (e.g., schema changes) and feature attribution drift in real-time endpoints.
An e-commerce company wants to audit who invoked their SageMaker recommendation endpoint. Which service provides this information?
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.