AWS Lambda – Error importing numpy from a layer
I need to import numpy for a lambda function. Already tried to create a layer but it is still not working.
Numpy on AWS GovCloud Lambda
I seem to have a unique issue which is quite surprising! I need to add Numpy to my Lambda function and I’m using a layer rather than Docker (not interested in using Docker at the moment). I use cloudwatch, which is on X86 architecture, to pip install numpy -t ./python, then zip up the python folder and use that as my layer. I’m also running my Lambda function on an x86 architecture. This method works for every other package I need, so there seems to be something wrong with the way Numpy is getting compiled. Also, unfortunately on GovCloud the AWS provided package AWS SDK for Pandas
is not available.