Description
Git layer fails in the new Lambda nodejs10.x container released this week.
Repro steps:
- I used
arn:aws:lambda:us-west-1:553035198032:layer:git:5
inus-west-1
- Lambda configured with
nodejs10.x
- Ran the following
child_process.exec
git clone command (from within/tmp
):git clone https://$USERNAME:[email protected]/$OWNER/$REPO.git
- Received the following error:
error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
This isn't particular surprising considering the messaging AWS has been doing this week about the underlying library changes in Lambda nodejs10.x.
Reference:
- https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/
- https://aws.amazon.com/about-aws/whats-new/2019/05/aws_lambda_adds_support_for_node_js_v10/
- https://aws.amazon.com/amazon-linux-2/
Their announcement email:
Hello,
We are updating the AWS Lambda and AWS Lambda@Edge execution environment to include recent versions of Amazon Linux and software packages.
A majority of functions will seamlessly benefit from the enhancements in this update without requiring you to take any action. However, in rare cases package updates may introduce compatibility issues. Functions that contain libraries or application code compiled against very specific underlying OS packages, specifically those for openssl, glibc, or other system libraries, may potentially be impacted.
Starting May 14, 2019, you can test your functions with the new execution environment. From May 21, 2019, all new functions or updates of existing functions will use the new execution environment. Your existing functions will automatically migrate to using the new execution environment on June 11, 2019.
See the following blog post to learn more about the update including the timeline, testing guidelines, and how you can prepare[1].
[1] https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/
Sincerely,
Amazon Web Services
Edit: per tweeters, ratcheting down urgency since AWS Linux 2 isn't being forced into other Lambda container images yet; re-scoped issue more specifically to nodejs10.x