ENGLISH

Hands-on Azure Functions with C#: Build Function as a Service (FaaS) Solutions

Book information

Publisher
Apress
Year
2021
ISBN
1484271211, 9781484271216
Language
english
Format
PDF
Filesize
36 MB (37270144 bytes)
Edition
1
Pages
547\531
Time added
2021-08-19 14:37:44

Description

Build serverless solutions using Azure Functions. This book provides you with a deep understanding of Azure Functions so you can build highly scalable and reliable serverless applications. The book starts with an introduction to Azure Functions and demonstrates triggers and bindings with use cases. The process to build an OTP mailer with Queue Storage Trigger and SendGrid output binding is presented, and timer triggers and blob storage binding are covered. Creating custom binding for Azure Functions and building a serverless API using Azure Functions and Azure SQL are discussed. You will know how to build a serverless API using Azure Functions and Azure Cosmos DB, and you will go over enabling application insights and Azure Monitor. Storing function secrets in Azure Key Vault is discussed as well as authentication and authorization using Azure Active Directory. You will learn how to secure your serverless apps using API Management and deploy your Azure Functions using IDEs. Deploying your Azure Functions using CI/CD pipelines is demonstrated along with running Azure Functions in containers. You will learn how to leverage Azure Cognitive Services to build intelligent serverless apps. And the authors introduce you to Azure Durable functions and teach you how to integrate Azure Functions in the logic app workflow. They also discuss best practices and pitfalls to avoid while designing Azure Functions. After reading this book, you will be able to design and deploy Azure Functions and implement solutions to real-world business problems through serverless applications.  What Will You LearnMonitor and secure Azure FunctionsBuild and deploy Azure FunctionsEnable continuous integration/continuous deployment (CI/CD) DevOps strategies for Azure FunctionsRun Azure Functions on Azure Kubernetes Cluster Who This Book Is For Experienced developers, cloud architects, and tech enthusiasts in Azure Table of Contents About the Authors About the Technical Reviewer Acknowledgments Introduction Chapter 1: Introduction to Azure Functions Structure of the Chapter Objectives Introduction to Azure Functions Introduction to Serverless Azure WebJobs vs. Azure Functions Advantages and Disadvantages of Azure Functions Hosting Plans for Azure Functions Consumption Plan Premium Plan Dedicated Plan Use Cases for Azure Functions Summary Chapter 2: Build Your First Azure Function Structure of the Chapter Objectives Create Functions Using the Azure Portal Create Functions Locally Using the Command Line Create Functions Using Visual Studio Code Create Functions Using Visual Studio Summary Chapter 3: What Are Triggers and Bindings? Structure of the Chapter Objectives Introduction to Triggers and Bindings Supported Triggers and Bindings Trigger and Binding Use Cases Use Case: An Azure function gets triggered when a message arrives in a queue, and the processed message is put into another queue Use Case: A scheduled job picks up images for Blob Storage at a particular time interval and then processes and stores them back in the Blob Storage Use Case: An HTTP call invokes an Azure function to execute some business logic Use Case: An event grid can invoke an Azure function to send an email with event data Use Case: RabbitMQ triggers an Azure function that processes the message sent by RabbitMQ and puts the processed message in Azure Cosmos DB Implement Triggers and Bindings for Azure Functions Summary Chapter 4: OTP Mailer with Queue Storage Trigger and SendGrid Binding Structure of the Chapter Objectives Getting Started with a Queue Storage Trigger and Use Cases Build a Sample Application Using a Queue Storage Trigger Getting Started with a SendGrid Output Binding and Use Cases Build a Sample Application Using the SendGrid Output Binding Create an OTP Mailer Using a Queue Storage Trigger and SendGrid Output Binding Summary Chapter 5: Build a Report Generator with a Timer Trigger and Blob Storage Bindings Structure of the Chapter Objectives Getting Started with Timer Triggers and Use Cases Build a Sample Application Using a Timer Trigger Getting Started with Blob Storage Bindings and Use Cases Build a Sample Function Using a Blob Storage Binding Create a Report Generator Using a Blob Storage Binding and Timer Trigger Summary Chapter 6: To-Do API with an HTTP Trigger and a Table Storage Binding Structure of the Chapter Objectives Getting Started with HTTP Triggers and Use Cases Build a Sample Application Using an HTTP Trigger Routing in HTTP-Triggered Azure Functions Getting Started with Table Storage Bindings and Use Cases Build a Sample Application Using a Table Storage Binding Create a To-Do API with an HTTP Trigger and a Table Storage Binding Summary Chapter 7: Creating Custom Bindings for Azure Functions Structure of the Chapter Objectives Introduction to Custom Bindings Use Cases for Custom Bindings Build a Custom Binding for Azure Functions Create an Azure Function Implement the Binding Attribute Class Implement the Binding Logic Class Implement the Binding Extension Class Implement the Binding Startup Class Incorporate the Binding in the Azure Function Summary Chapter 8: Building Serverless APIs Using Azure Functions and Azure SQL Structure of the Chapter Objectives Problem Statement Creating an Azure SQL Database Instance in the Azure Portal Building Serverless APIs for the Proof of Concept Testing the Serverless APIs for the Proof of Concept Summary Chapter 9: Serverless API Using Azure Functions and Azure Cosmos DB Structure of the Chapter Objectives Introduction to Azure Cosmos DB and Its Use Cases Getting Started with Azure Function Cosmos DB Triggers by Building a Simple Application Build an HTTP-Triggered Azure Function to  Perform CRUD Operations on Azure Cosmos DB Using Bindings Leverage the Azure Cosmos DB SDK to Interact with Cosmos DB from Azure Functions Summary Chapter 10: Enabling Application Insights and Azure Monitor Structure of the Chapter Objectives Enable Logging Using Application Insights Perform Diagnostics for Azure Functions Monitor Azure Functions and Create Alerts Restrict the Number of Scaling Instances for the Azure Function App Summary Chapter 11: Storing Function Secrets in Azure Key Vault Structure of the Chapter Objective Getting Started with Azure Key Vault Create an Azure Key Vault in the Azure Portal Store Secrets in Key Vault Create an Azure Function in the Azure Portal Add an Access Policy for Azure Key Vault Summary Chapter 12: Authentication and Authorization Using Azure Active Directory Structure of the Chapter Objectives What Is Azure Active Directory? What Are Authentication and Authorization? Implement Authentication and Authentication for Azure Functions Using Azure Active Directory Summary Chapter 13: Securing Azure Functions with API Management Structure of the Chapter Objectives What Is the API Management Service? Advantages of Using the API Management Service Integrate API Management with Azure Functions Summary Chapter 14: Deploying Your Azure Functions Using IDEs Structure of the Chapter Objective Deploy an Azure Function to Azure Using Visual Studio 2019 What Are Deployment Slots? Deploy an Azure Function to Deployment Slots Deploy an Azure Function to Azure Using VS Code Summary Chapter 15: Deploying Your Azure Functions Using a CI/CD Pipeline with Azure DevOps Structure of the Chapter Objectives What Is Azure DevOps? Create a Project in Azure DevOps Create a Build Pipeline in Azure DevOps and Enable Continuous Integration Create a Release Pipeline in Azure DevOps and Enable Continuous Delivery Summary Chapter 16: Running Azure Functions in Containers Structure of the Chapter Objectives Getting Started with Containers and AKS What Is Serverless Kubernetes and KEDA in Azure? Containerize Azure Functions and Push Them to the Azure Container Registry Deploy the Containerized Azure Functions in AKS Using KEDA Summary Chapter 17: Adding Cognitive Capabilities to Your Azure Functions Structure of the Chapter Objective Getting Started with Azure Cognitive Services Getting Started with Azure Text Analytics Create an Azure Text Analytics Resource in the Azure Portal Build a Serverless API to Analyze Feedback Using Sentiment Analysis Test the FeedbackAnalyzer Function Using Postman Build a Language-Based Document Classifier Serverless Solution Test the Language-Based Document Classifier Function Summary Chapter 18: Introduction to Azure Durable Functions Structure of the Chapter Objectives Getting Started with Azure Durable Functions Benefits of Azure Durable Functions Application Patterns Fan-Out and Fan-In Function Chaining Async HTTP APIs Monitoring Human Interaction Aggregator Implement an Azure Durable Function Summary Chapter 19: Integrating Azure Functions in a Logic Apps Workflow Structure of the Chapter Objective Getting Started with Azure Logic Apps Create an Azure Logic Apps Solution in the Azure Portal Add Azure Functions in Logic Apps Workflows Summary Chapter 20: Best Practices and Pitfalls to Avoid Structure of the Chapter Objectives Design Guidelines and Best Practices Decide to Use Functions or Not for Your Scenario Choose the Correct Programing Language Choice of Hosting Plan Pick a Stateful or Stateless Solution Mitigate Delay Startups Get the Correct Bill to Fit Your Budget Handle Long-Running Code Facilitate Integration and Communication Among Other Azure and External Services Identify and Manage the Bottlenecks Make Your Solution Fault Tolerant Secure the APIs Developed Using Azure Functions Facilitate Efficient Monitoring and Debug Failures Incorporate DevOps Practices and Bring in an IaC Approach Bring in a Defensive Programming Approach Pitfalls to Avoid Sharing Functions in a Single Function App Service Processing the Input Data One Piece at a Time Hosting the Production and Development Functions in the Same Function App Service Sharing Storage Accounts Across Function App Services Summary Index

Similar books