AZ-900 Practice Question 12: Serverless Compute
Microsoft Azure Fundamentals (AZ-900) · Test 2 · question 2 of 10
A team has a short piece of image-resizing code that should run every time a file is uploaded to Azure Blob Storage. They do not want to manage servers, and they want to be billed for the code itself rather than for a machine sitting idle between uploads. Which option fits?
Show answer and explanation
Answer:
Azure Functions is Microsoft's serverless compute service: you supply the code, and Azure supplies and maintains all the infrastructure underneath it. Its triggers and bindings connect a function to other services without extra code, and "run code when a file is uploaded or changed in blob storage" is one of the documented scenarios. Serverless hosting plans bill on pay-as-you-go consumption rather than on reserved capacity, which is the second half of the requirement.
Option A is IaaS; an availability set spreads VMs across fault and update domains for resilience, but the VMs are billed while they are allocated whether or not an upload arrives, and the team would own the guest OS. Option B is PaaS, but a *dedicated* App Service plan reserves instances that are billed continuously and scale on their own schedule, so it fails the billing constraint. Option C is the pre-cloud pattern the stem is trying to replace: a polling VM runs (and is charged for) around the clock and still has to be patched.
Reference: Azure Functions overview