Skip to content
AWS Certified Machine Learning Engineer – Associate (MLA-C02) Exam Prep

Lesson 8 of 8 · 12 min

x
8/8

Domain 4: Operating, Monitoring, and Securing ML and AI Solutions (Part 2 of 2)

This lesson covers 3 exam topics: Managing ML and FM Costs, Access Control, IAM and FM Credentials, Network Isolation, Auditing and Safeguards. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Managing ML and FM Costs

Video lesson: MLA-C02 33/35: Managing ML and FM Costs

Central question: Where does the money go, and how do you cap and cut it?

Cost tools (general background)

AWS Cost Explorer (analyse spend), AWS Budgets (alerts and thresholds), cost allocation tags (by team, project, model), AWS Cost Anomaly Detection, Service Quotas to cap usage.

FM cost in production (skills 4.2.7, 4.2.9; verified Bedrock items)

LeverEffect
Model size / routingSmaller models for simple tasks; intelligent prompt routing
Prompt cachingCheaper repeated prefixes
Batch / Flex~50% lower for work that can wait
Provisioned throughputOnly for steady load
Response limits, context pruningFewer tokens

AI-specific cost patterns (skill 4.2.10)

  • Token usage: per feature and team (CloudWatch token metrics).
  • Embedding computation: re-embedding everything after small changes is wasteful; embed incrementally; batch embedding jobs.
  • Vector storage: choose the store by query rate (S3 Vectors for low-QPS, cost-optimized storage); lower dimensions or binary vectors reduce storage (verified: binary vectors cost less but are less precise).

Exam traps

  • Re-embedding the whole corpus for a few changed documents.
  • No budgets or tags, so nobody knows which team spends what.
  • Provisioned throughput for bursty traffic.

2. Access Control, IAM and FM Credentials

Video lesson: MLA-C02 34/35: Access Control, IAM and FM Credentials

Central question: Who and what can touch models, data and endpoints — and with which credentials?

Least privilege for ML artefacts (general background plus guide)

  • Separate execution roles per training job, endpoint, pipeline and notebook user.
  • Scope S3 access to specific prefixes; KMS key policies for encrypted artefacts.
  • Restrict sagemaker:CreateEndpoint, model registry approval and bedrock:InvokeModel to the roles that need them; scope to model ARNs.
  • Use condition keys (e.g. VPC, tags) to enforce network and project boundaries.

Bedrock credentials (skill 4.3.8; verified)

CredentialLifetimeUse
IAM credentials (roles)Temporary STS credentialsDefault for applications and services
Short-term Bedrock API keyUp to 12 hours (or session); inherits the IAM principal's permissionsRecommended for production use of API keys
Long-term Bedrock API keyUntil a set expiry; creates an IAM userExploration only

API calls are logged in CloudTrail; API keys travel as authorization headers and are not logged.

Exam traps

  • Long-term API keys in production.
  • One admin role shared by every ML component.
  • Hard-coded keys in notebooks or containers (use roles or Secrets Manager).

3. Network Isolation, Auditing and Safeguards

Video lesson: MLA-C02 35/35: Network Isolation, Auditing and Safeguards

Central question: How do you isolate, audit and protect ML and AI workloads end to end?

Network isolation (skill 4.3.6; verified where linked)

  • Run training and endpoints in private subnets of your VPC (VpcConfig; two AZs for hosting).
  • Security groups restrict traffic; VPC endpoints (PrivateLink) for SageMaker and Bedrock; S3 gateway endpoint.
  • Network isolation mode for training containers blocks outbound calls (general background).

Pipeline and image security (skill 4.3.1; verified)

  • Amazon Inspector scans ECR container images and Lambda functions for vulnerabilities.
  • Amazon CodeGuru Reviewer analysed code for defects and secrets — it stopped accepting new repository associations on November 7, 2025; use Inspector code scanning or other tools for new setups.

Auditing and compliance (skill 4.3.4; verified)

AWS CloudTrail (who called which API), AWS Config (resource configuration history and rules, e.g. "endpoints must use KMS"), CloudWatch Logs, Bedrock model invocation logging (off by default).

Risks and troubleshooting (skills 4.3.5, 4.3.7; design guidance)

Common issues: AccessDenied from missing role permissions or KMS key policy; endpoints failing to pull artefacts without an S3 endpoint; public buckets (Macie, Config rules); prompt injection and data leakage in GenAI apps.

Safeguards (skill 4.3.9; verified)

Amazon Bedrock Guardrails: content filters (incl. prompt attack), denied topics, word filters, sensitive information filters (mask PII), contextual grounding and Automated Reasoning checks; ApplyGuardrail for non-Bedrock models.

Exam traps

  • Endpoints with public internet access when the requirement is isolation.
  • Recommending CodeGuru Reviewer for new repositories.
  • Logging prompts with raw PII instead of masking.

References

  1. MLA-C02 Domain 4 — checked Oct 19, 2026
  2. Bedrock pricing — checked Oct 19, 2026
  3. Prompt caching — checked Oct 19, 2026
  4. S3 Vectors — checked Oct 19, 2026
  5. How KBs work (binary vectors) — checked Oct 19, 2026
  6. Bedrock API keys — checked Oct 19, 2026
  7. SageMaker in a VPC — checked Oct 19, 2026
  8. Amazon Inspector — checked Oct 19, 2026
  9. CodeGuru Reviewer — checked Oct 19, 2026
  10. AWS Config — checked Oct 19, 2026
  11. Bedrock Guardrails — checked Oct 19, 2026

Check your understanding

  • Alert when ML spend passes $10,000 this month?Show answer

    Answer

    AWS Budgets.
  • Production app needs a Bedrock API key?Show answer

    Answer

    Short-term key (or IAM role credentials).
  • Scan container images in ECR?Show answer

    Answer

    Amazon Inspector.
  • Attribute costs per project?Show answer

    Answer

    Cost allocation tags.
  • Training job should read only one S3 prefix?Show answer

    Answer

    Execution role scoped to that prefix.

Next step: take a MLA-C02 practice exam

You have reached the end of the course. Take practice exam 1 without notes, check your score by domain, then go back to the lessons for your weakest domain before the next exam. There are 10 exams with 650 questions in all, and every answer is explained.

Previous

Progress is saved in this browser.

Finish Course