Support for Lambda on Arm CPUs
See original GitHub issueContext
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 the CreateFunction
AWS API endpoint to create the Lambda function. Amazon has updated the API to add a new Architectures
argument that can be set to either x86_64
or arm64
(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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:5
I will work on this issue
My mistake. You’re 100% right. It always looks for x86. I’ll shut up now 😳