Microsoft Azure Architect Design (AZ-304) Practice Test 2025 – All-In-One Guide to Master Your Certification!

Question: 1 / 400

What should you use to execute custom C# code in response to an event routed to Azure Event Grid, minimizing costs?

Azure Logic Apps in the integrated service environment

Azure Functions in the Dedicated plan

Azure Logic Apps in the Consumption plan

Azure Functions in the Consumption plan

Using Azure Functions in the Consumption plan is an efficient way to execute custom C# code in response to events routed to Azure Event Grid while also minimizing costs. The Consumption plan allows you to pay only for the compute power you consume, which means you are charged based on the number of executions and the resources used during those executions. This model is ideal for event-driven architectures where the frequency and volume of events can vary greatly.

Event Grid excels at delivering events from various sources like Azure services or custom applications, and Azure Functions provides a serverless compute option to process those events. By leveraging Azure Functions, you can write your custom C# code to handle the events seamlessly without needing to manage infrastructure, which is also cost-effective since you don’t incur running costs when the function is not executing.

The other options do not align as well with minimizing costs during event handling. For instance, Azure Functions in the Dedicated plan incurs a consistent cost for dedicated resources regardless of usage, making it less economical in scenarios where function calls may be sporadic. Similarly, Logic Apps, while capable of handling events, tend to introduce a higher operational cost compared to the serverless execution model of Azure Functions in the Consumption plan, particularly for custom processing tasks. The Consumption plan for Logic

Get further explanation with Examzify DeepDiveBeta
Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy