Fatskills
Practice. Master. Repeat.
Study Guide: Cloud ML - Azure AI Engineer Associate (Exam AI-102): Provision and Secure Resources (Azure AI Services, Keys, RBAC, VNet, Private Endpoints)
Source: https://www.fatskills.com/machine-learning-101/chapter/cloud-ml-cert-azure-ai-provision-and-secure-resources-azure-ai-services-keys-rbac-vnet-private-endpoints

Cloud ML - Azure AI Engineer Associate (Exam AI-102): Provision and Secure Resources (Azure AI Services, Keys, RBAC, VNet, Private Endpoints)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~6 min read

Azure_AI – Provision and Secure Resources (Azure AI Services, Keys, RBAC, VNet, Private Endpoints)


Azure AI-102 Study Guide: Provision and Secure Resources (Azure AI Services, Keys, RBAC, VNet, Private Endpoints)


What This Is

This topic covers how to deploy, configure, and secure Azure AI services—such as Azure Cognitive Services, Azure OpenAI, and Azure Machine Learning—while ensuring compliance, cost efficiency, and low-latency access. A real-world scenario: A healthcare company needs to deploy a secure, HIPAA-compliant AI model for analyzing medical images. They must restrict access to internal VNets, rotate API keys automatically, and log all inference requests for auditing. Misconfigurations here can lead to data leaks, compliance violations, or cost overruns.


Key Terms & Services

  • Azure AI Services (formerly Cognitive Services)
    Microsoft’s pre-built, managed AI APIs (e.g., Computer Vision, Speech-to-Text, Language Understanding). Best for quick deployment without training models (e.g., sentiment analysis, OCR, face detection).

  • Azure OpenAI Service
    Managed access to GPT-4, DALL·E, and Codex with enterprise-grade security. Used for generative AI, chatbots, and code generation—requires approval and strict RBAC.

  • Azure Machine Learning (Azure ML)
    End-to-end MLOps platform for training, deploying, and monitoring models. Supports custom models (PyTorch, TensorFlow) and AutoML.

  • Azure Key Vault
    Securely stores secrets, API keys, and certificates. Used to rotate keys for AI services without redeploying apps.

  • Role-Based Access Control (RBAC)
    Azure’s permission system (e.g., Cognitive Services User, Azure ML Data Scientist). Controls who can deploy models, access data, or manage keys.

  • Virtual Network (VNet)
    Isolated private network in Azure. Used to restrict AI service access to internal resources (e.g., VMs, databases).

  • Private Endpoint
    A private IP address within a VNet that connects to Azure services without traversing the public internet. Critical for compliance (HIPAA, GDPR) and low-latency inference.

  • Managed Identity
    An automated way to authenticate Azure services (e.g., a VM or Function App) without storing keys. Reduces key rotation overhead.

  • Azure Private Link
    Enables private connectivity to Azure services (e.g., Azure AI, Storage) without exposing them to the public internet.

  • Network Security Groups (NSGs)
    Firewall rules for VNets that allow/deny traffic to AI services (e.g., block public access to an Azure OpenAI endpoint).

  • Azure Policy
    Enforces compliance rules (e.g., "All AI services must use private endpoints"). Used for governance and auditing.

  • Azure Monitor & Log Analytics
    Logs and metrics for AI services (e.g., track API calls, latency, errors). Critical for debugging and cost tracking.


Step-by-Step / Process Flow


1. Deploy an Azure AI Service (e.g., Computer Vision) with Secure Access

  1. Create the AI service in the Azure Portal (or via CLI/Bicep).
  2. Choose region, pricing tier (Free/F0 vs. Standard/S0), and multi-region redundancy if needed.
  3. Enable a Private Endpoint (for VNet isolation):
  4. Go to Networking → Private Endpoint → Add.
  5. Select the VNet and subnet where private traffic will originate.
  6. Configure RBAC (who can access the service):
  7. Assign roles like:
    • Cognitive Services User (can call APIs)
    • Cognitive Services Contributor (can manage the service)
  8. Store API keys in Key Vault (instead of hardcoding):
  9. Create a Key Vault → Add the AI service’s primary/secondary keys as secrets.
  10. Grant your app’s Managed Identity access to Key Vault.
  11. Test private connectivity:
  12. Deploy a VM in the same VNet → Call the AI service via its private endpoint URL (e.g., https://<service-name>.privatelink.cognitiveservices.azure.com).

2. Secure Azure OpenAI with VNet and Private Endpoints

  1. Request access to Azure OpenAI (requires approval).
  2. Deploy a model (e.g., gpt-4) in the Azure Portal.
  3. Enable Private Endpoint:
  4. Go to Networking → Private Endpoint → Add.
  5. Select the VNet and subnet (e.g., 10.0.1.0/24).
  6. Restrict public access:
  7. Set Public Network Access to Disabled (only private traffic allowed).
  8. Use Managed Identity for authentication:
  9. Assign the Cognitive Services OpenAI User role to your app’s identity.
  10. Avoid using API keys (less secure).

3. Rotate API Keys Automatically with Key Vault

  1. Store keys in Key Vault:
  2. Add the AI service’s primary and secondary keys as secrets.
  3. Set up key rotation:
  4. Use Azure Automation or Logic Apps to regenerate keys every 30/90 days.
  5. Update Key Vault with the new key.
  6. Grant apps access via Managed Identity:
  7. Apps fetch the latest key from Key Vault without redeployment.

Common Mistakes

Mistake Correction
Hardcoding API keys in code/config files Use Key Vault + Managed Identity to avoid leaks.
Not restricting public access to AI services Enable Private Endpoints + NSGs to block public traffic.
Using the same key for all environments (dev/prod) Generate separate keys per environment and store in Key Vault.
Forgetting to enable diagnostic logs Enable Azure Monitor + Log Analytics to track API usage and errors.
Assuming Private Endpoints work without DNS Configure private DNS zones (e.g., privatelink.cognitiveservices.azure.com) to resolve private IPs.


Certification Exam Insights


What the AI-102 Exam Tests

  1. Service Selection Traps
  2. Azure AI Services vs. Azure OpenAI vs. Azure ML:
    • Use Azure AI Services for pre-built APIs (e.g., OCR, sentiment analysis).
    • Use Azure OpenAI for generative AI (GPT-4, DALL·E).
    • Use Azure ML for custom model training/deployment.
  3. Private Endpoint vs. Service Endpoint:


    • Private Endpoint = private IP in your VNet (best for compliance).
    • Service Endpoint = public IP with VNet restrictions (less secure).
  4. RBAC Role Confusion

  5. Cognitive Services User = Call APIs (e.g., a web app).
  6. Cognitive Services Contributor = Manage the service (e.g., a DevOps engineer).
  7. Key Vault Secrets User = Read secrets (e.g., an app fetching API keys).

  8. Key Rotation & Security

  9. Never use API keys in production—always Managed Identity + Key Vault.
  10. Rotate keys every 90 days (exam may ask about best practices).

  11. Compliance Scenarios

  12. HIPAA/GDPRPrivate Endpoints + VNet isolation.
  13. Cost controlEnable logging + set budget alerts.

Quick Check Questions


Question 1

A financial services company needs to deploy a fraud detection model that processes PII data. The model must only be accessible from internal VMs and log all inference requests. Which combination of services meets these requirements? - A) Azure AI Services + Public Endpoint + Azure Monitor - B) Azure ML + Private Endpoint + Log Analytics - C) Azure OpenAI + Service Endpoint + Key Vault - D) Azure AI Services + Private Endpoint + Log Analytics

Answer: D
Explanation: Azure AI Services (for pre-built fraud detection) + Private Endpoint (for VNet isolation) + Log Analytics (for auditing) is the correct combo. Azure ML is overkill for pre-built models, and Service Endpoints are less secure than Private Endpoints.


Question 2

A data scientist needs to deploy a custom PyTorch model for real-time inference with low latency. The model must only accept requests from a specific subnet (10.0.1.0/24). What should they configure? - A) Azure AI Services with a Service Endpoint - B) Azure ML with a Private Endpoint + NSG rule - C) Azure OpenAI with a Public Endpoint - D) Azure Functions with a VNet Integration

Answer: B
Explanation: Azure ML (for custom models) + Private Endpoint (for VNet isolation) + NSG rule (to restrict to 10.0.1.0/24) is the correct setup. Azure AI Services is for pre-built APIs, and Public Endpoints are insecure.


Last-Minute Cram Sheet

  1. Azure AI Services = Pre-built APIs (Computer Vision, Speech, Language).
  2. Azure OpenAI = Generative AI (GPT-4, DALL·E) – requires approval.
  3. Private Endpoint = Private IP in your VNet (best for compliance).
  4. Service Endpoint = Public IP with VNet restrictions (less secure).
  5. Managed Identity > API Keys (avoid hardcoding secrets).
  6. Key Vault = Store API keys (rotate every 90 days).
  7. RBAC Roles:
  8. Cognitive Services User = Call APIs.
  9. Cognitive Services Contributor = Manage the service.
  10. ⚠️ Private Endpoints need DNS (configure privatelink.cognitiveservices.azure.com).
  11. ⚠️ Azure OpenAI requires approval (not available by default).
  12. ⚠️ Public access disabled = Only private traffic allowed (critical for HIPAA/GDPR).


ADVERTISEMENT