Code Monkey home page Code Monkey logo

Comments (12)

moznion avatar moznion commented on July 20, 2024 2

Sorry for my late reply. I'll take a look at this.

from aws-lambda-perl5-layer.

Hideman85 avatar Hideman85 commented on July 20, 2024 1

Why you ask this? I mean AWS lambda environment is not related to your computer node version.
image

Amazon Linux AMI (https://aws.amazon.com/amazon-linux-ami/) this is the os used by lambda environment.

I think public layer that was built by the owner only support Node.js 8.10 and not Node.js 10.x, I'm not a expert of the Amazon Linux AMI but the only things that I can say is it work for Node.js 8.10 and not Node.js 10.x.

from aws-lambda-perl5-layer.

patrickd- avatar patrickd- commented on July 20, 2024 1

Probably a super dirty hack but copying the library from my local machine into the /lib directory of the layer zip file worked

$ whereis libcrypt.so.1
libcrypt.so: /lib/x86_64-linux-gnu/libcrypt.so.1

Related: https://stackoverflow.com/a/59816483/3950298

from aws-lambda-perl5-layer.

Hideman85 avatar Hideman85 commented on July 20, 2024

I recently have the same issue maybe due lambda environment changes (because works before with Node.js 8.x and now on Node.js 10.x).

Can you please have a look for Node.js 10.x?

Edit: I revert back my lambda to Node.js 8.x I don't have any issue so it's definitely come with the lambda environment Node.js 10.x

from aws-lambda-perl5-layer.

davehodg avatar davehodg commented on July 20, 2024

On my mac:
$ node -v
v12.6.0

Is that far ahead in time?

from aws-lambda-perl5-layer.

davehodg avatar davehodg commented on July 20, 2024

It was a question from ignorance. I have a personal (Catalyst for now) app which will probably be better as a few Lambda functions. I'll get round to playing with it as soon as I've finished re-skinning it.

from aws-lambda-perl5-layer.

jasonmacdonald avatar jasonmacdonald commented on July 20, 2024

I got bit by this today as well. Even trying to simply call /opt/bin/perl --version from inside a Node 10 lambda using Perl fails with the Libcrypt message.

/opt/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or director

from aws-lambda-perl5-layer.

nicu-chiciuc avatar nicu-chiciuc commented on July 20, 2024

Previously I resorted to using the nodejs8 runtime which had multiple libraries. Now that it's getting deprecated and I can't even update my existing lambda, I have to update to nodejs10/12. Not only is libcrypt.so absent but also libcurl.so which creates the same problems for mediainfo.
The most annoying is that an ec2 instance with the same runtime as aws lambdas (Amazon Linux 2) ami-0df0e7600ad0913a9 has both libcurl and libcrypt.
At this point I'm thinking about dropping aws lambdas altogether and start leveraging docker containers. Lambdas were supposed to make things simpler but I have to make a lot of hacks to make things work (or maybe I don't have enough knowledge/experience to understand my mistakes).

from aws-lambda-perl5-layer.

moznion avatar moznion commented on July 20, 2024

Iā€™m sorry to have kept you waiting!

I've just published the new layers that include libcrypt and libcurl, which referred to the comment from @patrickd-. Thanks a lot!

related commits:

The new layers are the following:

  • arn:aws:lambda:${REGION}:652718333417:layer:perl-5_26-layer:4
  • arn:aws:lambda:${REGION}:652718333417:layer:perl-5_28-layer:2
  • arn:aws:lambda:${REGION}:652718333417:layer:perl-5_30-layer:1

I've confirmed that it works well on those layers, could you please try it? @nicu-chiciuc

(and this might not be a bug of this layer, so I remove the label)

from aws-lambda-perl5-layer.

moznion avatar moznion commented on July 20, 2024

Note:
I gave up to include entire shared libraries in the layers because it touches the AWS quota of the maximum limit of layer size.

from aws-lambda-perl5-layer.

nicu-chiciuc avatar nicu-chiciuc commented on July 20, 2024

@moznion, Thanks for your updates.

This is definitely not a bug of the current layer. There are multiple issues scatered around github about libraries removed from Amazon Linux 2 and the problems they cause. I've resorted to using https://github.com/lambci/yumda and add curl so that I can make at least mediainfo work in my function.
I was using exiftool (and your layer) when I needed more specific information about files but I guess I'll add it back (and check your changes) after we pass the deadline.

from aws-lambda-perl5-layer.

moznion avatar moznion commented on July 20, 2024

I close this issue. Please feel free to reopen if you're still facing the same or similar problem šŸ‘

from aws-lambda-perl5-layer.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.