Can anyone tell me why I should use Azure Function output bindings (e.g. SendGrid or Twilio) rather than just using proper SDK (e.g. Sendgrid SDK) explicitly in my C# function to achieve my goal?
I suppose that using the output binding my code may be cleaner (no need to initialize Twilio client for example), but I still would rather use proper vendor SDK to get recent updates and features instantly.
Is there any other reason (performance?) to use output bindings?
An input binding is the data that your function receives. An output binding is the data that your function sends. Unlike a trigger, a function can have multiple input and output bindings.
Bindings are optional and a function might have one or multiple input and/or output bindings. Triggers and bindings let you avoid hardcoding access to other services. Your function receives data (for example, the content of a queue message) in function parameters.
Which of the following is an advantage of using bindings in your Azure Functions to access data sources and data sinks? They provide access to more data sources than are available using code.
It comes down to control vs convenience:
Use the output binding when you want the quickest solution with the least amount of code. The output bindings have been designed with the Azure functions runtime in mind, i.e. how it scales as load increases and how that impacts the service you are targeting.
Use a custom connection in code backed by keyvault (for API keys) when you want more granular control over the interaction, where you can fine tune connection settings and how the interaction happens but keep in mind you need to code your interaction in a way that works in synergy with how the functions runtime behaves.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With