Courseiva

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

You are developing a solution that processes large files uploaded by users to Azure Blob Storage. Each file must be validated for malware using Microsoft Defender for Cloud Apps before being moved to a different container for further processing. The validation can take several minutes. What is the most cost-effective and scalable approach?

⚠ Common exam trap

Watch out — candidates often assume polling-based solutions (like Logic Apps or background services) are simpler or more reliable, but the exam emphasizes event-driven architectures as the most cost-effective and scalable pattern for blob processing in Azure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Azure Event Grid to trigger an Azure Function on blob creation, which validates the file and moves it after scan.

Azure Event Grid provides a serverless, event-driven architecture that triggers an Azure Function immediately when a blob is created. This eliminates the need for polling or idle compute resources, making it the most cost-effective and scalable approach for processing large files that require time-consuming malware validation.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use Azure Event Grid to trigger an Azure Function on blob creation, which validates the file and moves it after scan.

    Why this is correct

    This is the most efficient and scalable solution. Azure Event Grid provides near real-time, push-based event notifications for blob creation, eliminating the need for continuous polling. An Azure Function, triggered by Event Grid, executes only when a new blob is detected, leveraging a serverless, consumption-based model that is highly cost-effective and automatically scales to handle fluctuating loads without managing infrastructure.

  • Use the Azure SDK to poll for new blobs from within a continuously running background service.

    Why it's wrong here

    Using the Azure SDK to poll for new blobs from within a continuously running background service is highly inefficient. This approach constantly consumes compute resources, even when no new files are uploaded, leading to unnecessary operational costs and increased latency in detecting new blobs. It does not scale effectively with varying workloads and is fundamentally less reactive than an event-driven architecture.

  • Use an Azure VM running a scheduled task to poll for new blobs and perform validation.

    Why it's wrong here

    An Azure VM running a scheduled task to poll for new blobs is a less scalable and cost-effective approach. A virtual machine incurs continuous costs regardless of its actual workload, and scaling it up or down to meet fluctuating demands for file processing requires manual intervention or complex automation. This solution also introduces significant operational overhead for VM management, patching, and maintenance, which is avoided with serverless options.

  • Use Azure Logic Apps with a recurrence trigger to check for new blobs and call the Microsoft Defender API.

    Why it's wrong here

    While Azure Logic Apps are powerful for orchestration, using a recurrence trigger to check for new blobs is a form of polling, which can be inefficient. For long-running operations like file scanning and validation, the consumption-based pricing model of Logic Apps can become significantly more expensive than an Azure Function, especially if checks are frequent or processing times are extended. Event Grid offers a more direct and cost-optimized trigger for blob creation.

Quick reference

Azure Blob Storage Tier Comparison

TierStorage CostRetrieval CostLatencyUse Case
HotHighestLowestImmediateActive data, frequent reads
CoolLowerHigherImmediateData accessed < once / month
ColdLower stillHigherImmediateData accessed < once / quarter
ArchiveLowestHighest + rehydration delayHoursLong-term compliance retention

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.