Courseiva
Develop Azure compute solutionseasyMultiple SelectObjective-mapped

AZ-204 Blob lease Practice Question

You are creating an Azure Functions app that uses a Blob Storage trigger to process new files. The function must process files only when they are completely written (i.e., no ongoing writes). You need to avoid processing partially written files. Which TWO configurations should you consider?

⚠ Common exam trap

Candidates often assume that the Blob trigger has built-in properties like 'LeaseBlob' or 'ScanBlob' to handle partial writes, but these are not valid. Instead, the proper patterns are to check the blob's timestamp or use a separate timer-triggered function to poll for stability.

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

Check the blob's 'LastModified' timestamp in the function code to verify no recent changes.

Checking the blob's 'LastModified' timestamp in the function code allows you to verify that no recent writes have occurred. By comparing the timestamp to the current time and adding a delay, you can ensure the file is complete before processing. Option C is correct because a timer-triggered function can periodically list blobs and check for a stable size (unchanged over a period) to determine if the blob is fully written. This avoids the trigger firing on partially written files. Options D and E are incorrect because 'LeaseBlob' and 'ScanBlob' are not valid properties of the Azure Functions Blob trigger binding. The recommended approach is to manually acquire a lease inside the function code, which is not explicitly listed as an option here.

Answer analysis

Option-by-option breakdown

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

  • Increase the 'BatchSize' to reduce the frequency of trigger evaluations.

    Why it's wrong here

    Increasing BatchSize only affects how many blobs are fetched at once from the queue, but does not help with detecting partial writes. The trigger can still fire on a blob that is being written. Therefore, A is incorrect.

  • Check the blob's 'LastModified' timestamp in the function code to verify no recent changes.

    Why this is correct

    Checking the 'LastModified' timestamp and ensuring a sufficient delay since the last modification can help guarantee the blob is fully written. This is a valid manual approach. Therefore, B is correct.

  • Use a timer-triggered function that lists blobs and processes those with a stable size.

    Why this is correct

    Using a timer-triggered function that lists blobs and processes those with a stable size (unchanged over a period) is a valid pattern to avoid partial writes. Therefore, C is correct.

  • Use the 'BlobTrigger' with the 'LeaseBlob' property set to 'True'.

    Why it's wrong here

    'LeaseBlob' is not a valid property of the Azure Functions Blob trigger binding. While acquiring a lease is a recommended approach, it must be done manually in the function code, not as a trigger binding property. Therefore, D is incorrect.

  • Set the 'ScanBlob' property to 'True' in the trigger binding.

    Why it's wrong here

    'ScanBlob' is not a valid property of the Azure Functions Blob trigger binding. There is no built-in trigger property to scan for completeness. Therefore, E is incorrect.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

Go deeper

Related to this question

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.