Author: Jonah Andersson
This is a starter template for Serverless deveöpment with Azure Durable Functions available to those you wants to try it out. A hands-on lab created with Azure Durable Functions with Function Chaining application pattern.
This template is prepared as starter template that allows you to develop Azure Functions (Durable Functions) serverless workflow with integration to other APIs such as Twilio API and Sendgrid API and Azure services - Azure Storage, ServiceBus etc.
Azure Durable Functions - Function Chaining Example with Azure Service Bus, Twilio API, Sendgrid API and Azure BLOB Storage- Orchestration get trigged by an image or BLOB uploaded to the Azure Storage
- Chain 1 - Sends queue message to Azure Service Bus
- Chain 2 - Send SMS or make call using Twilio API
- Chain 3 - Send email to configured email address using SendGrid API
- Chain 4 - Lab Exercise to send to Azure Cosmos DB etc. (Guide: How to create Azure Cosmos DB Trigger)
- Basics concepts of Azure Serverless Computing, Azure Functions and Durable Functions
(If you are a student of Forefront's Serverless course, great. Otherwise, check Recommended Learning below) - Microsoft Azure account - Private or Organization subscription account
(If you don't have any Azure Account, sign up https://azure.microsoft.com/en-us/free/) - Latest version of Visual Studio or VS Code
- Azure Storage Explorer (https://azure.microsoft.com/en-us/features/storage-explorer/)
- Programming Language C# .NET (You can code in other supported languages as well - see supported languages)
- Install latest .NET Core 3.1 (LTS) or latest supported like .NET 6 https://dotnet.microsoft.com/download
- Install Azure Functions Core Tools
- If you are using .NET Core 3.1 it will not be supported by the end of 2022 and you need to upgrade to functions version 4.0
- Postman for HTTP Requests/Triggers
- DEVELOPMENT LOCALLY use file local.settings.json with your own configuration strings, API keys
RECOMMENDATION: Use Azure Key Vault and Managed Identities to secure your function application for Azure Durable Functions
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "<PUT YOUR AZUREWEBJOBSSTORAGE CONNECTION STRING HERE>"
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"StorageConnectionString": "<YOUR AZURE STORAGE CONNECTION STRING HERE>"
"AzureServiceBusConnectionString": "<PUT YOUR AZURE SERVICE BUS CONNECTION STRING HERE>",
"ServiceBusQueueName": "blobstoragenotifierqueue",
"Twilio_SID": "<YOUR TWILIO API SID>",
"Twilio_Secret": "<YOUR TWILIO API SECRET KEY>",
"Admin_Email": "<EMAIL ADDRESS TO RECEIVE EMAIL FOR SENDGRID EMAILS",
"Admin_Name": "<YOUR NAME OR DUMMY NAME>",
"Admin_Mobile": "<YOUR TEST MOBILE WITH COUNTRY CODE TO RECEIVE TWILIO API SMS & CALL>",
"Twilio_Verified_Number": "<THE REGISTERED TWILIO API TRIAL ACCOUNT MOBILE NUMBER HERE>",
"SendGridAPIKey": "<YOUR SENDGRID API KEY HERE>",
"CosmosDBEndPointUri": "<YOUR AZURE COSMOS DB ENDPOINT URI HERE",
"CosmosDBKey": "<YOUR AZURE COSMOS DB KEY HERE>"
}
-
Azure Storage Account for Azure Function App and a BLOB container to upload image files and for the Blob Storage Trigger
-
Azure Service Bus Namespace with a queue name that matches the queue name of your app configuration
-
Twilio API Account - API Keys and Secret are used to code the logic to send SMS and make call from the function app
-
SendGrid API Account - API Keys and Secret are used to code logic in sending email
When developing Azure Functions locally using this project. You should see similar like this when it is finished. It logs what is happening with your orchestration. You may also check on
Click on the image below to watch the recording of my talk for this session at the NDC Olso Conferene
Watch session on YouTube https://www.youtube.com/watch?v=C199S4R7cy8
- Azure Durable Functions Documentation
- Microsoft Learn
- Azure Functions University on YouTube by Marc Duiker
- Azure Functions University Lessons on GitHub by Marc Duiker and Community
- My article about Azure Durable Functions at DEV Community Blog
- Serverless .NET Development with Azure Durable Functions by Jonah Andersson at Philippine .NET User Group (PHINUG)
- Azure Durable Functions Fundamentals at Azure User Group Sundsvall by Jonah Andersson
- Azure Serverless Community Library
- Azure Storage Account
- SendGrid with Azure Functions