Skip to content

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

Open

Description

@jmjava

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

Activity

  1. mhart commented on Jul 21, 2021

    @mhart
    Member

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

  2. jmjava commented on Jul 21, 2021

    @jmjava
    Author

    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 /

  3. mhart commented on Jul 21, 2021

    @mhart
    Member

    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/

  4. jmjava commented on Jul 21, 2021

    @jmjava
    Author
  5. mhart commented on Jul 21, 2021

    @mhart
    Member

    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?)

  6. jmjava commented on Jul 21, 2021

    @jmjava
    Author
  7. jimwelagu commented on Jun 22, 2022

    @jimwelagu

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions