3 ms·
An alternative to this is to statically compile and use scratch docker image. Another tip is if writing a http app etc Axum/Actix have Lambda shims. I add a c
by tiew9Vii 2y ago
An alternative to this is to statically compile and use scratch docker image.
Another tip is if writing a http app etc Axum/Actix have Lambda shims.
I add a cli flag “—lambda” which enables the shim. That means I can run the app locally, in Kubernetes, ECS, Lambda with minimum effort. It also makes dev easier pretending lambda doesn’t exist.
- beeb 2y agoThose are great tips! I'll have a look at the axum shim, which certainly would help if using axum in the first place. Minimal functions like we have at my work rarely need a fully featured framework however.
- wrboyce 2y agoI’ve done similar with Python based apps a few times, there is something quite satisfying about a Docker image that can run in multiple contexts! (I’ve also distributed a Go based app using a FROM scratch image, but that’s not quite as cool imo).