You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for using layer.zip with AWS Lambda containers #32
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
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)
Unfortunately, this is part of CDK application and I have the lambda
container in CDK custom control.
I was able to get a bit further by adding this to my docker file
RUN mkdir /opt/layer
COPY layer/layer.zip /opt/layer
RUN unzip -o /opt/layer/layer.zip -d /
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib
ENV PATH=/bin:$PATH
but it seems the binaries from the layer.zip are trying to create a new
directory?
[image: image.png]
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?)
Ok thanks Michael. Appreciate the help - your work at least is a start
here.
Thanks again for the reply - this can be considered closed.
I will update with any comments if I finally get it running.
On Wed, Jul 21, 2021 at 4:34 PM Michael Hart ***@***.***> wrote:
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?)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEQPB3AU32VNEOZVBVHZ4TTY4VMVANCNFSM5AYRL5DA>
.
Activity
mhart commentedon Jul 21, 2021
This instructions for using are in the README: https://github.com/lambci/git-lambda-layer#getting-started
jmjava commentedon 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 commentedon 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 commentedon Jul 21, 2021
mhart commentedon 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 commentedon Jul 21, 2021
jimwelagu commentedon Jun 22, 2022
@jmjava Any update on if you got this to work with your containerized lambda?