Let’s say I have some CLI (docker for example). Would it be possible to call that CLI from inside a lambda?
Related discussions:
Let’s say I have some CLI (docker for example). Would it be possible to call that CLI from inside a lambda?
Related discussions:
Yes you can call a cli (or any binary) using whatever code library you want, you just need to ensure it’s:
a) in the container (can do this either by packaging it in the zip OR using lambda layers, I did the latter when I tried this)
b) you use the correct path to call it
c) it was compiled for the container’s architecture/the required interpreter is in the container
d) it doesn’t require root permissions (the lambda code is not executed by a root user in the container)
e) it doesn’t require local file write access (the container is a read-only file system)
Keep in mind there is a size limitation as well for the executable size.
Yes. You just need to have the binary compiled for Amazon Linux. Or if it’s something like a python script, include the interpreter binary.
We run imagemagick on a lambda, compiled from sources on an EC2 and included in the lambda package.
If you are working with lambda, look in to aws chalice or serverless. It will take care of the s3 deployment package itself. Just my suggestion.
You can do this, yes. The last project I read about that does this uses Exodus to reliably drag in all their dependencies.
You can google your way into other projects, but this blog post looks like a decent rundown of how the process works.
yes, now possible using a bash layer with lambda