Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for using layer.zip with AWS Lambda containers #32

Open
jmjava opened this issue Jul 21, 2021 · 7 comments
Open

Support for using layer.zip with AWS Lambda containers #32

jmjava opened this issue Jul 21, 2021 · 7 comments

Comments

@jmjava
Copy link

jmjava commented Jul 21, 2021

I realize this probably out of scope

We have a Python lambda that runs from the AWS lambda container

FROM public.ecr.aws/lambda/python:3.8

We are running into the issue with git clone command.

PRIV_END: seteuid: Operation not permitted

I have tried setting the environment variable but this is not working

ENV GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no'

I see you have the layer.zip with all the binaries - would it be possible to share instructions on how to use this in the lambda container? Do I merge the files into the respective folders in the container?

thanks for any reply - this is the only place I have found where there seems to be a solution for this problem

@mhart
Copy link
Member

mhart commented Jul 21, 2021

This instructions for using are in the README: https://github.com/lambci/git-lambda-layer#getting-started

@jmjava
Copy link
Author

jmjava commented Jul 21, 2021

Hi thanks. I am not using the basic lambda but a lambda container. Can I use a layer with a lambda container? Right now I am just taking the zip and unzipping to /

(this is not tested yet just a guess on how to do this in container)

RUN unzip -o /opt/layer/layer.zip -d /

@mhart
Copy link
Member

mhart commented Jul 21, 2021

SAM CLI supports layers in lambda containers if you want to run locally. https://aws.amazon.com/blogs/compute/working-with-aws-lambda-and-lambda-layers-in-aws-sam/

@jmjava
Copy link
Author

jmjava commented Jul 21, 2021 via email

@mhart
Copy link
Member

mhart commented Jul 21, 2021

Doing the same thing as what SAM CLI does is probably your best bet. Mount the layer in your docker container under /opt – it'll be somewhere in their source code (they might have documentation for this?)

@jmjava
Copy link
Author

jmjava commented Jul 21, 2021 via email

@jimwelagu
Copy link

@jmjava Any update on if you got this to work with your containerized lambda?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants