Deploy your first function¶
The next step will be to deploy your function to Azure. We will use the VS Code extension again.
Click on the Azure extension on the VS Code sidebar (1 in image) and then click on the deploy to function app on the Azure functions section (2 in image).
Select the Create new app option and then provide a name for your app.
Select the correct Python runtime version.
Select a location for your resources (this the datacentre where all your resources will be located e.g. Western Europe).
Wait for the deployment to complete. You can see the progress on the pop-up window or on your output console.
Using the Azure portal¶
There are multiple ways to check the status of your function. We will do this from the Azure portal.
Head to portal.azure.com.
Click on the home icon on the sidebar (if the sidebar is hidden you need to click on the
>>
icon on the top left corner).The default Home view should show your new resources. For me, it shows the resource group called
pycon2020
as this is the name I gave it.On the sidebar find the Function app section and click on it (1 in image) and the on your function name:
Click on Monitor in the new sidebar.
In the following screen, you should be able to see the status of your function, the runs and their statuses as well as the URL for your app. You can also click on each individual run to check the logs output.
🎉 Congratulations you have deployed your first serverless function! 🥳