Skip to content

Is it possible to use Lambda Layers with references to .dll files? #599

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

Closed
SSkupien opened this issue Mar 11, 2020 · 3 comments
Closed

Is it possible to use Lambda Layers with references to .dll files? #599

SSkupien opened this issue Mar 11, 2020 · 3 comments
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.

Comments

@SSkupien
Copy link

Hi, I would like to create a Layer with custom libraries (.dll). Is it possible?
From my research, I found out that layers for .NET lambda works with NuGet references.

Details:
I want to deploy many Lambda functions that all of them would use the same model/methods that I have implemented in my .dll library. I would like to create a layer with that .dll so I won't need to have this library in every lambda .zip.
I know that I can create NuGet from my library and that way create a layer and have it working but this way each time I would like to upgrade version of my library it will require an update for all of lambda's even when having backward compatibility in .dll. All because of the specific version reference in lambda for NuGet.
If it will be possible to have reference to .dll in the layer then I would be able to update .dll library and then update Lambda's one by one when I would like to.

@normj normj added the guidance Question that needs advice or information. label Mar 13, 2020
@normj
Copy link
Member

normj commented Mar 13, 2020

Using .NET's runtime package store feature, which is created from NuGet packages, is certainly the easiest way to include additional dlls to a .NET process. If you create a layer with just dlls then it would be up to you to explicitly load those assemblies into your process. I would not recommend doing that because that ends up ignoring the deps.json file and child dependencies of your library might not be found.

To create a layer from NuGet package you don't necessary have to publish the packages with different version numbers. You can create the packages in a separate folder and then just add that folder to your list of NuGet sources when creating the layer.

Keep in mind Lambda layers themselves are versioned. So if you make a bug fix in your library and create an update the layer for it you still have to update all of your existing Lambda functions to use the new layer version.

@klaytaybai klaytaybai added the response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. label Mar 17, 2020
@github-actions
Copy link
Contributor

This issue has not recieved a response in 2 weeks. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 27, 2020
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 4, 2020
@github-actions github-actions bot closed this as completed Jun 4, 2020
@sohail-sf
Copy link

sohail-sf commented Feb 3, 2022

But I have written a blog regarding publishing custom DLL's on lambda layer if it is very essential for some one
https://medium.com/@sohail-dev/publish-custom-dlls-to-aws-lambda-layer-e4ac37a59b85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants