- Newest
- Most votes
- Most comments
Has the dolfin
package been compiled on an Amazon Linux platform? If it was created anywhere else the architecture is unlikely to match the runtime that Lambda uses (which is Amazon Linux).
It's not clear when you say "locally" what type of system that is - so I'd encourage you to test it on an EC2 instance.
No, the
dolfin
package has been compiled into a docker image which inherits from phusion/baseimage (base system : ubuntu).To be more accurate on the "locally" : I install the RIE on my local machine (MacOS High Sierra 10.13.6) and I run my lambda function using Docker Engine and the
docker run
command (I follow the last section of https://docs.aws.amazon.com/lambda/latest/dg/images-test.html)After your comment I tried with an EC2 instance with Amazon Linux 2 AMI (HVM) - Kernel 5.10. I installed Docker Engine on the instance and built the image according to the Dockerfile. I have no problem when I run the docker image as a container on EC2 and import the dolfin package but when I push (on ECR) and execute the same docker image with AWS Lambda I get the same std::string error message.
I've seen a similar thing in the far distant past with another Python package (in this case it was something to do with PDFs) which included precompiled binaries; and no matter what I did (even rebuilding from source): It would work on an instance but it wouldn't work in Lambda. I eventually ran out of time/patience/brainpower and did it another way. But: The Lambda runtime is quite restricted in what kernel calls can be made. Without diving into the source for the package it's impossible to say but my guess is that it's doing something that isn't allowed in Lambda. Very vague, sorry.
Relevant content
- Accepted Answerasked 2 years ago
- asked 4 months ago
- asked 7 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
Are you deploying to x86 or ARM?
I am deploying to x86