Skip to content

Files

Latest commit

a243bb5 · Mar 30, 2021

History

History
104 lines (62 loc) · 5.89 KB

functions-create-student-starter.md

File metadata and controls

104 lines (62 loc) · 5.89 KB
title description ms.topic ms.date
Create a function using Azure for Students Starter
Learn how to create an Azure Function from within an Azure for Student Starter subscription
how-to
04/29/2020

Create a function using Azure for Students Starter

In this tutorial, we'll create a "hello world" HTTP function in an Azure for Students Starter subscription. We'll also walk through what's available in Azure Functions in this subscription type.

Microsoft Azure for Students Starter gets you started with the Azure products you need to develop in the cloud at no cost to you. Learn more about this offer here.

Azure Functions lets you execute your code in a serverless environment without having to first create a VM or publish a web application. Learn more about Functions here.

[!INCLUDE quickstarts-free-trial-note]

Create a function

In this article, learn how to use Azure Functions to create an "hello world" HTTP trigger function in the Azure portal.

Create function app in the Azure portal

Sign in to Azure

Sign in to the Azure portal with your Azure account.

Create a function app

You must have a function app to host the execution of your functions. A function app lets you group functions as a logical unit for easier management, deployment, scaling, and sharing of resources.

[!INCLUDE Create function app Azure portal]

Next, you create a function in the new function app.

Create an HTTP trigger function

  1. From the left menu of the Functions window, select Functions, then select Add from the top menu.

  2. From the New Function window, select Http trigger.

    Choose HTTP trigger function

  3. In the New Function window, accept the default name for New Function, or enter a new name.

  4. Choose Anonymous from the Authorization level drop-down list, and then select Create Function.

    Azure creates the HTTP trigger function. Now, you can run the new function by sending an HTTP request.

Test the function

  1. In your new HTTP trigger function, select Code + Test from the left menu, then select Get function URL from the top menu.

    Select Get function URL

  2. In the Get function URL dialog box, select default from the drop-down list, and then select the Copy to clipboard icon.

    Copy the function URL from the Azure portal

  3. Paste the function URL into your browser's address bar. Add the query string value ?name=<your_name> to the end of this URL and press Enter to run the request.

    The following example shows the response in the browser:

    Function response in the browser.

    The request URL includes a key that is required, by default, to access your function over HTTP.

  4. When your function runs, trace information is written to the logs. To see the trace output, return to the Code + Test page in the portal and expand the Logs arrow at the bottom of the page.

    Functions log viewer in the Azure portal.

Clean up resources

[!INCLUDE Clean-up resources]

Supported features in Azure for Students Starter

In Azure for Students Starter, you have access to most of the features of the Azure Functions runtime, with several key limitations listed below:

  • The HTTP trigger is the only trigger type supported.
  • Languages Supported:
  • Windows is the only supported operating system.
  • Scale is restricted to one free tier instance running for up to 60 minutes each day. You'll serverlessly scale from 0 to 1 instance automatically as HTTP traffic is received, but no further.
  • Only version 2.x and later of the Functions runtime is supported.
  • All developer tooling is supported for editing and publishing functions. This includes VS Code, Visual Studio, the Azure CLI, and the Azure portal. If you'd like to use anything other than the portal, you'll need to first create an app in the portal, and then choose that app as a deployment target in your preferred tool.

Next steps

You've now finished creating a function app with a simple HTTP trigger function. Next, you can explore local tooling, more languages, monitoring, and integrations.