Hacker News new | ask | show | jobs
by tiew9Vii 566 days 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.

2 comments

I’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).
Those 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.