Hi! I have a question regarding setting it up as a...
# support-questions
s
Hi! I have a question regarding setting it up as a Lambda Layer. I followed the tutorial but I am getting this error
Copy code
[ERROR] Runtime.ImportModuleError: Unable to import module 'handler': /opt/python/cryptography/hazmat/bindings/_rust.abi3.so: invalid ELF header
Traceback (most recent call last)
I have spent the whole day to see if it was an issue with the architecture (x86_64), but it wasn't. I had success bunching up all the packages with my m1 mac with boto3. I am stumped here. Is there any advice?
r
Hey @soysushi
@KShivendu can help here.
k
Hey @soysushi, the error seems related to cryptography library. Can you try installing and zipping the requirements in a Linux environment (using docker) and loading it into AWS lambda layer? alternatively, you may try a different version of the cryptography library.
Hi @soysushi did this suggestion help you? if not, feel free to provide more details and I'll be happy to help 😄
s
I'll be trying this out on Monday when I'm back at work haha. Thank you guys for the super prompt response!
now i have a different error
Copy code
[ERROR] Runtime.ImportModuleError: Unable to import module 'handler': /opt/python/cryptography/hazmat/bindings/_rust.abi3.so: cannot open shared object file: No such file or directory
Traceback (most recent call last)
do i have to put the crypt onto another layer perhaps?
k
no you don't need to. what exactly did you try, docker or downgrading?
s
i started a docker container that is running in a Linux environment. I installed the same python and pip as my local machine. I followed the tutorial to zip the package and upload it to an AWS layer
our team is currently trying it with NodeJS and I am traversing stackoverflow.
r
Alright. Let us know if you face issues with node
k
@soysushi what version of python are you using? I can do the bundling for you.
We are considering generating .zip files for the lambda layer along with every release. This will make the lambda auth steps seamless. It will be implemented soon.