Creating and configuring Azure Functions

We have to create an Azure Function that will act as an intermediator between Azure Event Hub and our serverless function. Since Azure Functions are launched on demand, you pay for the time that they are actually used.

Perform the following steps:

  1. First, create the Function App by selecting Create a resource, then clicking on Compute, then finally selecting Function App, as shown in the following screenshot:

  1. Now, fill in the required specifications shown in the following screenshot: 

Please ensure that you select the Windows option and create a new Resource Group.

  1. Since the code is in JavaScript, make sure that the Runtime Stack is JavaScript. Click on Create.
  2. Wait for the deployment to be completed. Once it is complete, choose Go to resource as follows:

  1. Click on + New Function to add the code to call our serverless function. Choose the In-portal option and click on Continue:

  1. Choose the More templates... option:

  1. Click on Finish and view templates.
  2. Select Azure Event Hub trigger:

  1. An Extensions not Installed dialog will pop up. Click on Install:

Do not close the browser while the install is going on. It can take up to two minutes. Click Continue once it is done.

  1. In the dialog that pops up, give the function the name UserEventHubTrigger, and click on new in the Event Hub connection section:

  1. Select the following values:

  1. Use user as the Event Hub name and click on Create:

You will get the editor as follows:

In this way, we have created and configured Azure Functions successfully.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset