-
Notifications
You must be signed in to change notification settings - Fork 142
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
sam build --use-container fails with Error: PythonPipBuilder:ResolveDependencies - {wrapt==1.13.1(sdist)} when building for ARM, but not for x86 #302
Comments
Thanks for reporting the issue. I managed to reproduce the same result in Cloud9. I'm transferring to this issue to Lambda Builder. |
What seems to be occurring is that Lambda Builder is building the wheel for
The wheel that gets created on my t4g instance is named wrapt-1.13.3-cp39-cp39-linux_aarch64.whl .It seems that the builder then looks at all the wheels to ensure they are compatible. This is where wrapt gets failed. The code only considers wheels that match manylinux are compatible.
|
@praneetap @awood45 - As this is blocking us (Lambda Powertools) to offer ARM support, would you consider a PR to fallback to In our case, AWS Lambda Powertools depends on AWS X-Ray SDK which depends on Wrapt (C). Wrapt is commonly used by Python developers wanting to enforce decorator correctness. Wrapt builds wheels for multiple platforms but deliberately does not publish a @eldritchideen repro: https://github.com/eldritchideen/arm-python-lambda-example |
@heitorlessa this contribution would be awesome. Happy to support you in any way I can, @jfuss would be the dev poc to help with any questions. |
I don't this this is about It appears we handle this case specifically for x86:
@heitorlessa I think this is pretty straightforward and is likely just adding the
|
Sure! @eldritchideen as you did the leg work and should be credited, do you wanna make the PR and I can do the first review and/or help with tests? If you aren't free, I can look into it next Friday as I'm moving houses atm. |
@heitorlessa I'll take a look at the change and get a PR up. |
Thanks for working on this issue @eldritchideen . I confirmed that it is working as expected with latest version of SAM CLI which contains up to date lambda builders. Resolving this issue. |
Description:
Hi,
very excited about arm64 Lambda support, thank you!
I am trying to build a Python Lambda function for the arm64 architecture on an AWS Cloud9 instance with SAM CLI, version 1.33.0.
I have used:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
to make my environment arm64-ready and then:
sam build --use-container
to build.
However, I get the following error:
Error: PythonPipBuilder:ResolveDependencies - {wrapt==1.13.1(sdist)}
My code uses
aws-xray-sdk==2.8.0
inrequirements.txt
, which triggers installing the dependency:wrapt==1.13.1
.I am able to successfully build:
aws-xray-sdk
inrequirements.txt
and withArchitectures: ["arm64"]
intemplate.yaml
, andaws-xray-sdk
inrequirements.txt
but withoutArchitectures: ["arm64"]
intemplate.yaml
.This tells me that my arm64 build environment seems to be working and also that building Python dependencies inside a container works, too, but not the combination of both.
Am I missing something or is there a bug that specifically affects pip-based builds in arm64 containers?
Thanks,
Constantin
Steps to reproduce:
Architectures: ["arm64"]
in template.yaml to indicate that the Lambda function should be built for an arm64 architecture, andaws-xray-sdk==2.8.0
in itsrequirements.txt
to trigger the installation ofwrapt
by the pip builder.docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
to enable arm64 building.sam build --use-container
to trigger the error.Observed result:
Expected result:
A successful build.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.33.0The text was updated successfully, but these errors were encountered: