Skip to main content

Create an Azure Function with the Azure Portal

Hands-On Lab

 

Photo of

Training Architect

Length

00:30:00

Difficulty

Beginner

In this hands-on lab, we use the Azure Portal to create an HTTP-triggered Azure function and then run the function by retrieving the function's URL within a browser.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Create an Azure Function with the Azure Portal

Introduction

In this hands-on lab, we use the Azure Portal to create an HTTP-triggered Azure function and then run the function by retrieving the function's URL within a browser.

Scenario

You have been asked by your manager to create an Azure Function that can be executed via an HTTP GET request. You need to log in to Azure, create the function app service and the associated HTTP-triggered function, and ensure that it can be run.

Log In to the Azure Portal

  1. Log in to the Azure Portal using the credentials provided on the lab instructions page.

Create the Function App Service

  1. Click Create a resource.

  2. Enter "function app" without the quotes in the search box provided and search.

  3. Click the Function App box.

  4. Click Create.

  5. Use the Resource Group combo box to select the available resource group.

  6. Enter a unique name in the Function App Name box.

  7. Use the Runtime stack combo box to select .NET Core.

  8. Click Next: Hosting.

  9. Use the Plan type combo box to select App service plan.

  1. Click Change size.

  2. In the right-hand pane, select the S1 option.

  3. Click Apply.

  4. Back in the main window, click Next: Monitoring.

  5. Click Next: Tags.

  6. Click Next: Review + create.

  7. Click Create.

Create the HTTP-Triggered Function

  1. Once the deployment is complete, click Go to resource.

  2. In the left-hand pane, select Functions.

  3. Click + New function.

  4. Select the HTTP trigger box.

  5. Enter "MyHttpFunction" in the Name box.

  6. Click Create.

Test the Function

  1. On the far right-hand side of the screen, click Test to open the test panel.

  2. Click Run in the test panel.

  3. Verify the output in the Logs window.

Conclusion

Congratulations, you've completed this hands-on lab!