Microsoft Azure Fundamentals (AZ-900)Describe Azure architecture and servicesMedium
A company is implementing a serverless solution that needs to execute custom code in response to events, such as new files being uploaded to blob storage or messages arriving in a queue. The solution requires minimal operational overhead and should only incur costs when the code is actively running. Which Azure service should they choose?
- AAzure Virtual Machines
- BAzure App Service
- CAzure Functions
- DAzure Kubernetes Service (AKS)
Show answer & explanationAnswer & explanation
Correct answer: C. Azure Functions
Azure Functions is a serverless compute service that enables you to run event-driven code without provisioning or managing infrastructure. It automatically scales and you only pay for the compute time your code consumes, aligning perfectly with the requirements for minimal operational overhead and consumption-based billing.
Why the other options are wrong
- A. Azure Virtual Machines require manual provisioning and management, incurring costs regardless of active execution.
- B. Azure App Service hosts web applications and APIs, but is not primarily designed for event-driven, short-lived code execution with consumption billing.
- D. Azure Kubernetes Service (AKS) is a container orchestration service, requiring more management than a serverless function for simple event-driven tasks.
Azure Functions
A serverless compute service that lets you run event-driven code without having to explicitly provision or manage infrastructure. You pay only for the time your code is running.
- Event-driven execution model.
- Serverless: no infrastructure management.
- Consumption-based billing (pay-per-execution).
- Supports various programming languages and triggers.
Memory trick: Functions are for events, VMs are for control, App Service for web.