-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for layers #1
Comments
Yes, that's what's happening behind the scenes and that's exactly what it's needed according to the lambci docs. I just need to think a bit about the scenario where a SAM template is using several layers, and each function uses different layers. The CLI will probably need to accept a mapping of layers names to their paths. Does this makes sense? |
This makes sense, but why would we have to supply the mapping via the cli? Couldn't the CLI parse the SAM template and deduce which functions have layers and then read the path. I think we also have to take into consideration the case where a layer is specified locally, and the case where the layer is already on AWS and defined by an ARN. When it's defined by an ARN we would need to pull that image down from AWS, store it somewhere, and then run it as a separate container or volume. |
Okay, I haven't used layers for some time but here is my understanding, let me know what you think. For any of the following cases, we would have to, at startup, create a folder for each function, in which it would have the necessary function layers code, extracted. This folder would then be used for the docker volume.
We'll need to download layer from AWS and store the extracted content (cache needs to take in consideration the layer version).
|
@S-Cardenas Thanks for your interest but supporting layers requires a really big effort and I don't think it's worth it, as the sam cli team has already announced that they will tackle the keep container warm issue. Said this, if you still want layers support and don't mind getting your hands dirty, I'm more than happy to provide an hand 👍 |
In response to this original issue and comment.
I'm not quite sure what you're doing behind the scenes, but I imagine if you're mounting a lambci container for each function in the SAM template, you could check for any local layers and mount a volume between the layer path and
/opt
on the lambci container.The text was updated successfully, but these errors were encountered: