AZ-204 Practice Question: Connect to and consume Azure services and third-party services
You are developing a mobile app backend using Azure Functions. The app allows users to upload profile pictures. The pictures are stored in Azure Blob Storage and the metadata (user ID, blob URL, upload timestamp) is stored in Azure SQL Database. You need to implement a process that automatically generates a thumbnail for each uploaded picture and updates the metadata with the thumbnail URL. The thumbnail generation is CPU-intensive and may take up to 30 seconds per image. The solution should be serverless and cost-effective. Which combination of Azure services should you use?
⚠ Common exam trap
Many candidates choose Option B (Queue trigger) thinking it provides better decoupling for long-running tasks, but the Blob Storage trigger is the direct and simpler event-driven solution, and the 30-second processing time is well within Azure Functions' limits when using the Premium plan.
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 an Azure Blob Storage trigger to invoke an Azure Function that generates the thumbnail and updates Azure SQL Database.
Azure Blob Storage triggers are designed to invoke an Azure Function automatically when a new blob is created, which is ideal for this serverless, event-driven workflow. The function can generate the thumbnail (even with a 30-second CPU-intensive task, as Azure Functions support up to 10-minute execution on the Premium plan) and then update the Azure SQL Database with the thumbnail URL, all without managing infrastructure.
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 an Azure VM with a scheduled task to poll for new blobs and generate thumbnails.
Why it's wrong here
This approach is inefficient and costly for a mobile app backend requiring on-demand image processing. An Azure VM is a persistent compute resource that incurs costs continuously, even when no new images are being uploaded or processed. It lacks the inherent serverless scalability and cost-effectiveness of Azure Functions, which only consume resources and accrue charges during active execution, making it unsuitable for event-driven, variable workloads.
- ✗
Use an Azure Queue Storage trigger to invoke an Azure Function that processes the image and updates Azure SQL Database.
Why it's wrong here
While feasible, this option introduces unnecessary complexity and potential latency. It would require an additional mechanism (e.g., another Azure Function or a separate service) to write a message to the queue whenever a new blob is uploaded, duplicating the eventing capability already provided by Blob Storage itself. A direct Blob Storage trigger is more streamlined and efficient for reacting to new file uploads.
- ✓
Use an Azure Blob Storage trigger to invoke an Azure Function that generates the thumbnail and updates Azure SQL Database.
Why this is correct
This is the most appropriate and efficient solution. An Azure Blob Storage trigger directly invokes an Azure Function whenever a new image file is uploaded, providing a serverless, event-driven architecture that scales automatically with demand. This approach minimizes operational overhead and costs, as the function only runs and incurs charges when actual image processing is required, perfectly aligning with mobile app backend needs.
- ✗
Use Azure Event Grid to trigger an Azure Logic App that generates the thumbnail and updates Azure SQL Database.
Why it's wrong here
While Azure Event Grid effectively delivers blob creation events, using an Azure Logic App for image thumbnail generation is generally less optimal than an Azure Function. Logic Apps are workflow orchestrators often priced per action and execution, which can become more expensive for compute-intensive or potentially long-running tasks like image processing. Azure Functions offer a more performant and cost-effective compute environment for such specific code execution.
Quick reference
Azure Blob Storage Tier Comparison
| Tier | Storage Cost | Retrieval Cost | Latency | Use Case |
|---|---|---|---|---|
| Hot | Highest | Lowest | Immediate | Active data, frequent reads |
| Cool | Lower | Higher | Immediate | Data accessed < once / month |
| Cold | Lower still | Higher | Immediate | Data accessed < once / quarter |
| Archive | Lowest | Highest + rehydration delay | Hours | Long-term compliance retention |
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Durable Functions
Durable Functions is an extension of Azure Functions that lets you write stateful workflows in code, managing complex sequences of tasks, retries, and delays automatically.
Key term
Azure Functions Bindings
Azure Functions Bindings are declarative connections that link your serverless function code to Azure services or external resources, handling input and output data automatically without writing extra networking or authentication code.
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 →
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.