On Ubuntu 18.04, when I follow the steps in https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/ the lambda fails to run with the log:
START RequestId: 8ea03c41-6ca2-4e5a-b63c-d3461c8a777c Version: $LATEST
/var/task/bootstrap: line 4: /var/task/lib/: Is a directory
/var/task/bootstrap: line 4: exec: /var/task/lib/: cannot execute: Is a directory
END RequestId: 8ea03c41-6ca2-4e5a-b63c-d3461c8a777c
REPORT RequestId: 8ea03c41-6ca2-4e5a-b63c-d3461c8a777c Duration: 153.26 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 12 MB
When I replace $PKG_LD at
|
exec \$LAMBDA_TASK_ROOT/lib/$PKG_LD --library-path \$LAMBDA_TASK_ROOT/lib \$LAMBDA_TASK_ROOT/bin/$PKG_BIN_FILENAME \${_HANDLER} |
with loader name
ld-linux-x86-64.so.2, the lambda runs successfully.
When I move the if block at line 116 to line 112, it works for me:
|
# Do not copy libc files which are directly linked unless it's the dynamic loader |
|
if hasElement "$i" "${libc_libs[@]}"; then |
|
filename=$(basename "$i") |
|
if [[ -z "${filename##ld-*}" ]]; then |
|
PKG_LD=$filename # Use this file as the loader |
|
cp "$i" $PKG_DIR/lib |
|
fi |
|
continue |
|
fi |
On Ubuntu 18.04, when I follow the steps in https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/ the lambda fails to run with the log:
When I replace
$PKG_LDataws-lambda-cpp/packaging/packager
Line 141 in 1dccd2a
ld-linux-x86-64.so.2, the lambda runs successfully.When I move the if block at line 116 to line 112, it works for me:
aws-lambda-cpp/packaging/packager
Lines 113 to 121 in 1dccd2a