Title Page Copyright and Credits Azure Serverless Computing Cookbook Second Edition Dedication About Packt Why subscribe? Packt.com Contributors About the author About the reviewers Packt is searching for authors like you Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Sections Getting ready How to do it… How it works… There's more… See also Get in touch Reviews Developing Cloud Applications Using Function Triggers and Bindings Introduction Building a backend Web API using HTTP triggers Getting ready How to do it… How it works… See also Persisting employee details using Azure Storage table output bindings Getting ready How to do it... How it works... Understanding storage connection What is the Azure Table storage service? Partition key and row key There's more... Saving the profile images to Queues using Queue output bindings Getting ready How to do it… How it works… Storing the image in Azure Blob Storage Getting ready How to do it... How it works... There's more... Working with Notifications Using the SendGrid and Twilio Services Introduction Sending an email notification to the administrator of a website using the SendGrid service Getting ready Creating a SendGrid account Generating an API key from the SendGrid portal Configuring the SendGrid API key with the Azure Function app How to do it... Create Storage Queue binding to the HTTP Trigger Create Queue Trigger to process the message of the HTTP Trigger Create SendGrid output binding to the Queue Trigger How it works... There's more Sending an email notification dynamically to the end user Getting ready How to do it... Accept the new email Parameter in the RegisterUser function Retrieve the UserProfile information in the SendNotifications trigger How it works... There's more... Implementing email logging in Azure Blob Storage How to do it... How it works... Modifying the email content to include an attachment Getting ready How to do it... Customizing the log file name using IBinder interface Adding an attachment to the email Sending an SMS notification to the end user using the Twilio service Getting ready How to do it... How it works... Seamless Integration of Azure Functions with Azure Services Introduction Using Cognitive Services to locate faces in images Getting ready Creating a new Computer Vision API account Configuring application settings How to do it... How it works... There's more... Azure SQL Database interactions using Azure Functions Getting ready How to do it... How it works... Monitoring tweets using Logic Apps and notifying users when a popular user tweets Getting ready How to do it... Creating a new Logic App Designing the Logic App with Twitter and Gmail connectors Testing the Logic App functionality How it works... Integrating Logic Apps with serverless functions Getting ready How to do it... There's more... See also Auditing Cosmos DB data using change feed triggers Getting ready Creating a new Cosmos DB account Creating a new Cosmos DB collection How to do it... How it works... There's more... Understanding the Integrated Developer Experience of Visual Studio Tools Introduction Creating a function app using Visual Studio 2017 Getting ready How to do it... How it works... There's more... Debugging C# Azure Functions on a local staged environment using Visual Studio 2017 Getting ready How to do it... How it works... There's more... Connecting to the Azure Storage cloud from the local Visual Studio environment Getting ready How to do it... How it works... There's more... Deploying the Azure Function app to Azure Cloud using Visual Studio How to do it... There's more... Debugging a live C# Azure Function, hosted on the Microsoft Azure Cloud environment, using Visual Studio Getting ready How to do it... Deploying Azure Functions in a container Getting ready Creating an ACR How to do it... Creating a Docker image for the function app Pushing the Docker image to the ACR Creating a new function app with Docker How it works... Exploring Testing Tools for the Validation of Azure Functions Introduction Testing Azure Functions Getting ready How to do it... Testing HTTP triggers using Postman Testing a Blob trigger using Microsoft Storage Explorer Testing the Queue trigger using the Azure Management portal There's more... Testing an Azure Function on a staged environment using deployment slots How to do it... There's more... Load testing Azure Functions using Azure DevOps  Getting ready How to do it... There's more... See also Creating and testing Azure Functions locally using Azure CLI tools Getting ready How to do it... Testing and validating Azure Function responsiveness using Application Insights Getting ready How to do it... How it works... There's more... Developing unit tests for Azure Functions with HTTP triggers Getting ready How to do it... Monitoring and Troubleshooting Azure Serverless Services Introduction Troubleshooting your Azure Functions How to do it... Viewing real-time application logs Diagnosing the entire function app There's more... Integrating Azure Functions with Application Insights Getting ready How to do it... How it works... There's more... Monitoring your Azure Functions How to do it... How it works... Pushing custom telemetry details to Application Insights Analytics Getting ready How to do it... Creating an Application Insights function Configuring access keys Integrating and testing an Application Insights query Configuring the custom derived metric report How it works... Sending application telemetry details via email Getting ready How to do it... How it works... There's more... See also Integrating real-time Application Insights monitoring data with Power BI using Azure Functions Getting ready How to do it... Configuring Power BI with a dashboard, a dataset, and the push URI Creating an Azure Application Insights real-time Power BI – C# function How it works... There's more... Developing Reliable Serverless Applications Using Durable Functions Introduction Configuring Durable Functions in the Azure Management portal Getting ready How to do it... There's more... Creating a Durable Function hello world app Getting ready How to do it... Creating an HttpStart function in the Orchestrator client Creating the Orchestrator function Creating an activity function How it works... There's more... Testing and troubleshooting Durable Functions Getting ready How to do it... Implementing multithreaded reliable applications using Durable Functions Getting ready How to do it... Creating the Orchestrator function Creating a GetAllCustomers activity function  Creating a CreateBARCodeImagesPerCustomer activity function How it works... There's more... Bulk Import of Data Using Azure Durable Functions and Cosmos DB Introduction Business problem Durable serverless way of implementing an Excel import Uploading employee data into Blob Storage Getting ready How to do it... How it works... There's more... Creating a Blob trigger Getting ready How to do it... There's more... Creating the Durable Orchestrator and triggering it for each Excel import How to do it... How it works... There's more... Reading Excel data using activity functions Getting ready How to do it... Read data from Blob Storage Read Excel data from the stream Create the activity function There's more... Auto-scaling Cosmos DB throughput Getting ready How to do it... There's more... Bulk inserting data into Cosmos DB How to do it... There's more... Implementing Best Practices for Azure Functions Adding multiple messages to a queue using the IAsyncCollector function Getting ready How to do it... How it works... There's more... Implementing defensive applications using Azure Functions and queue triggers Getting ready How to do it... CreateQueueMessage – C# console application Developing the Azure Function – queue trigger Running tests using the console application How it works... There's more... Handling massive ingress using Event Hubs for IoT and other similar scenarios Getting ready How to do it... Creating an Azure Function event hub trigger  Developing a console application that simulates IoT data  Avoiding cold starts by warming the app at regular intervals Getting ready How to do it... Creating an HTTP trigger Creating a timer trigger There's more... See also Enabling authorization for function apps Getting ready How to do it... How it works... There's more... Controlling access to Azure Functions using function keys How to do it... Configuring the function key for each application Configuring one host key for all the functions in a single function app There's more... Securing Azure Functions using Azure Active Directory Getting ready How to do it... Configuring Azure AD to the function app Registering the client app in Azure AD Granting the client app access to the backend app  Testing the authentication functionality using a JWT token Configuring throttling of Azure Functions using API Management Getting ready How to do it... Integrating Azure Functions with API Management Configuring request throttling using inbound policies Testing the rate limit inbound policy configuration How it works... Securely accessing SQL Database from Azure Functions using Managed Service Identity Getting ready How to do it... Creating a function app using Visual Studio 2017 with V1 runtime Creating a Logical SQL Server and a SQL Database Enabling the managed service identity Retrieving Managed Service Identity information Allowing SQL Server access to the new Managed Identity Service Executing the HTTP trigger and testing There's more... See also Shared code across Azure Functions using class libraries How to do it... How it works... There's more... Using strongly typed classes in Azure Functions Getting ready How to do it... How it works... There's more... Configuring of Serverless Applications in the Production Environment Introduction Deploying Azure Functions using the Run From Package Getting ready How to do it... How it works... There's more... Deploying Azure Function using ARM templates Getting ready How to do it... There's more... Configuring custom domain to Azure Functions Getting ready How to do it... Configuring function app with an existing domain Techniques to access Application Settings Getting ready How to do it... Accessing Application Settings and connection strings in the Azure Function code Application setting – binding expressions  Creating and generating open API specifications using Swagger Getting ready How to do it... Breaking down large APIs into small subsets of APIs using proxies Getting ready How to do it... Creating microservices Creating the gateway proxies Testing the proxy URLs There's more... See also Moving configuration items from one environment to another using resources Getting ready How to do it... Implementing and Deploying Continuous Integration Using Azure DevOps Introduction Prerequisites Continuous integration – creating a build definition Getting ready How to do it... How it works... There's more... Continuous integration – queuing a build and triggering it manually Getting ready How to do it... Configuring and triggering an automated build How to do it... How it works... There's more... Continuous integration – executing unit test cases in the pipeline How to do it.. There's more... Creating a release definition Getting ready How to do it... How it works... There's more... See also Triggering the release automatically Getting ready How to do it... How it works... There's more... Other Books You May Enjoy Leave a review - let other readers know what you think