Code Monkey home page Code Monkey logo

aws-lambda-perl5-layer's People

Contributors

erjanmx avatar moznion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-lambda-perl5-layer's Issues

This is not an issue...

Thank you so much for something incredibly useful. Can you please expand on the documentation, please? There are SWS terms that you just throw out there that don't mean anything to us that are still working through the starter Cloud Practitioner stuff.

Thanks!

Handle exceptions and call Invocation Error endpoint

Hi, I'm just checking out this layer and it seems incredibly helpful! Thanks for providing it.

While reading the code I notice that you don't handle exceptions but rather rely on it calling the default script exception handler. Have you considered using an eval block around the function call to trap exceptions and report them to https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html#runtimes-api-invokeerror . Indeed after that you might want to do the same with the require statement to catch compile errors too.

Anyway, thanks a lot and I expect I'll be using this layer going forward! Cheers.

use: command not found

I added the Perl layer with the Using Provided Layers approach but I keep receiving the error:

use: command not found

The Lambda function bootstrap file is successfully finding the pl file but it doesn't understand that perl code inside of it.

@moznion, are there additional steps to use the provided layer?

image

Getting error "perl: error while loading shared libraries: libcrypt.so.1:"

For the past couple of hours I've been trying to setup exiftool on an Lambda instance and have a Node handle invoke it, process the output and send it back. I've managed to set this up easily for ffprobe since I could just upload it as a static binary (although now I realise that I can use a layer for that).
Since exiftool is a script I was trying to install perl somehow and finally, after a lot of digging I found this nice solution.

I'm using the Serverless framework and my .yml is minimal:

provider:
  name: aws
  runtime: nodejs10.x
  versionFunctions: false
  region: eu-central-1

functions:
  hello:
    handler: handler.hello
    layers:
      - arn:aws:lambda:eu-central-1:652718333417:layer:perl-5_26-layer:1

The handler function is also minimal, it executes an command that is sent to it:

module.exports.hello = (event, context, callback) => {
  if (event.cmd) {
    const child = child_process.exec(event.cmd, (error, stdout, stderr) => {
      // Resolve with result of process
      callback(null, { error, stdout, stderr });
    });
  }
}

And I'm sending the follwing json:

{
  "cmd": "perl -ver"
}

It deploys without problems but when I try to invoke it, I get the following error:

{
    "error": {
        "killed": false,
        "code": 127,
        "signal": null,
        "cmd": "perl -ver"
    },
    "stdout": "",
    "stderr": "perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory\n"

I'm still new to the whole serverless architecture stuff so there may be a simple solution but I can't seem to find it. Any help would be appreciated.

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.