Azure Functions
Microsoft Azure’s serverless offering
Unfortunately, Azure Functions is still unsupported natively on Apple Silicon e.g., M1 chip. Thus, I am not able to finish deploying today. This article is still a work in progress, I will add the Windows version, and MacOS when I find a workaround.
Azure Functions implement event-driven code blocks called “functions”.
There are 3 methods to create an Azure Functions: VS code, the command line, and Azure portal.
I will walkthrough the VS code method first, then the others afterwards.
- Use the v2 Python programming model (decorator based approach to create functions)
- Install “Azure Functions Core Tools”, a command-line interface (CLI) tool provided by Microsoft for developing and testing Azure Functions locally on your computer.
- Install Python 3, if not already.
In VS code, sign in to Azure.
This opens a browser tab, authenticate with your Microsoft Azure account.
Azure Functions currently does not support arm64 AKA Apple M1 chip. An emulator for x86 is needed: Rosetta mode.
I installed iTerm2, a Terminal replacement/substitution and enabled Rosetta mode on it:
To verify, use the command uname -m
in the terminal. It should output: x86_64.
After more debugging and trying func host start
in the Terminal itself, it seems like this issue still remains.
This article seems to give a more detailed explanation and possible workaround: Run Azure Functions with Python on Apple Silicon | JimBobBennett.
I will have to try this another time. But for now, I will post next time, using a Windows machine. I will start doing more regular posts on what I’m working on, even if it is not successful — like this post. I’ll probably make a note at the top that it is unfinished or on the backlog for the future. Either way, I’m still reflecting on the best way to keep accountable, and this stresses more the journey of learning instead of getting this right first try all the time.
Sources: