2 ms·
I'm just going through this journey myself (migrating some Go event handling stuff to Lambda), will definitely have a blog post up in a few months. Lots of pain
by cube2222 5y ago
I'm just going through this journey myself (migrating some Go event handling stuff to Lambda), will definitely have a blog post up in a few months. Lots of pain, but also lots of gain.
Some advice:
Don't use zip files. There's no reason to use them. The OCI image approach let's you use much larger images (which with Go binary sizes might occasionally be important - 10GB vs 50MB) and only sounds scary. It's as easy as using zip files, if not easier, cause you just end up with a 10 line multistage docker image which does everything you need to produce your final artifact.
Also important, though that part is actually fairly well documented in the runtime reference, the runtime of your Lambda will be hibernated between invocations (a warm lambda, I don't mean cold starts). That means, if you have asynchronous goroutines which are periodically doing IO, you might end up with loads of timeouts and broken TCP connections there, as you'll often get hibernated mid-IO-operation.
- dc-programmer 5y agoThe last point is extra painful because it causes errors that are difficult to reproduce locally (even when using runtime interface emulator)
- deleted 5y ago[deleted]