aws-samples / aws-lambda-extensions

A collection of sample extensions to help you get started with AWS Lambda Extensions
MIT No Attribution
442 stars 145 forks source link

Extension.LaunchError, no such file or directory #54

Closed yuval-shavit closed 3 years ago

yuval-shavit commented 3 years ago

Hey, Followed the examples custom-runtime-extension-demo, nodejs-example-extension, and for both of them received: { "errorMessage": "RequestId: XXX Error: fork/exec /opt/extensions/{THE_EXTENSION_NAME}: no such file or directory", "errorType": "Extension.LaunchError" } while testing with the basic testing configuration in the UI.

From what I read in your docs everything inside the extensions dir suppose to be copied to /opt/extensions/, but it doesn't seem to happen here. Have you had this problem before? Also which part declares for the lambda function, the name of the extension to read from /opt/extensions/?

Thanks for the help:)

andreikho commented 3 years ago

Also tried yesterday and got the same issue. You wrote extensions in 3 different ways, lol:

yuval-shavit commented 3 years ago

Found what caused the problem, still didn't realize exactly why. Found that for some reason the extension file was encoded with CRLF (I'm not using Windows), and when I encoded it to only LF it worked.