-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Lambda on Arm CPUs #1051
Comments
Any PRs for this issue? |
I will work on this issue |
Zappa will upload to ARM if your system is running ARM. |
@dickermoshe I'm not sure that you are correct when you say: "Zappa will upload to ARM if your system is running ARM." Firstly, Zappa tries to upload whole .whl wheel files and it explicitly looks for x86_64 wheels, so if use a package that has a binary component and you you have something different on your local machine it will go and fetch the Intel versions. Secondly, the existing code never sets the architecture type for the requested Lambda instance and so this will always default to an Intel instance. As a result even when I deploy from ARM machines (either Raspberry Pi with 64bit OS or M1 Mac) it runs Zappa on an Intel Lambda instance. As for needing emulation, I don't think that is the case either. Zappa requires either pure Python modules or pre-built wheels; if there are existing ARM architecture wheel files then nothing needs to get built. |
My mistake. You're 100% right. |
Hi! Any news? |
Many people are waiting for this feature. I hope it will be released soon! |
hey folks, any updates on this? |
1 similar comment
hey folks, any updates on this? |
It looks like a PR (#1123) was created three years ago, but lay idle for too long and got auto-closed. @javulticat @lmuther8 Any chance you could merge one of the several PRs that fix this? Back in 2021, not all binary wheels had ARM support and AWS didn't offer ARM for Lambda in all regions. Now Arm64 is everywhere, both inside AWS and across the wider Linux, Mac and Windows communities. AWS's ARM offerings for Lambda have about 50% better price/performance ratio than x86, so merging support for architecture control would save people a lot of money! |
Please merge and finish the ARM support - the PR looks like it will work. I'm having to dig out my 4 year old ancient PC to update our API app. |
Is there any news about ARM support? Is it possible to re-open the PR #1123 ? |
Context
Amazon recently announced that they are now offering Lambda running on their custom Graviton2 CPUs. These are built around the Arm CPU architecture instead of Intel, apparently offering up to 19 percent better performance at 20 percent lower cost.
Zappa does not currently have a way to indicate which CPU architecture it should use for deployment. Furthermore, for Python packages that have binary components Zappa currently always fetches the wheel files for the
x86_64
architecture.It would be valuable if Zappa supported deployment on the Arm platform by means of a configuration setting.
Expected Behavior
n/a
Actual Behavior
n/a
Possible Fix
The code that implements
core.create_lambda_function()
calls theCreateFunction
AWS API endpoint to create the Lambda function. Amazon has updated the API to add a newArchitectures
argument that can be set to eitherx86_64
orarm64
(with the former as the default). A new architecture configuration setting should set this argument.The regular expressions that find the suitable wheel files and check for cached wheels will need to be updated to find the wheels for the correct architecture.
The text was updated successfully, but these errors were encountered: