1

I am trying to validate App Check tokens from my AWS lambda in python under the x86_64 architecture.

When i execute my AWS lambda, i got the following error :

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': /var/task/cryptography/hazmat/bindings/_rust.abi3.so: invalid ELF header
Traceback (most recent call last):

I have seen this answer but i am working on MacOS x86_64 so i have the same architecture as the target.

How can i solve this issue since it seems i have compiled it in the correct architecture ?

Note : I know that this is from Firebase App Check because it's the only dependency i have in my lambda and if i remove it everything is fine.

EDIT : here is my other question very related to this one. If someone answers the other, i will just have to compile firebase-admin on my docker ubuntu container.

0

1 Answer 1

-1

I was also facing the same issue, in my case I was using M1 Mac. To fix this I used the following code to install firebase-admin

pip install \
    --platform manylinux2014_aarch64 \
    --target=./package \
    --implementation cp \
    --python 3.9 \
    --only-binary=:all: --upgrade \
    firebase-admin

If you are using x86_64, you can use the following:

pip install \
    --platform manylinux2014_2014_x86_64 \
    --target=./python/lib/python3.9/site-packages \
    --implementation cp \
    --python 3.9 \
    --only-binary=:all: --upgrade \
    firebase-admin
Sign up to request clarification or add additional context in comments.

1 Comment

It will stop work of other dependent of all other packages of python.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.