Kotlin/Native AWS Lambda

Since Amazon announced custom runtimes it is possible to use K/N for AWS Lambda.

Take a look at an example AWS Lambda authored in K/N here. To understand how custom runtimes work, take a look at this tutorial.

As of March 2019 using K/N for Lambdas has, IMHO, more cons than cons:

  • The interaction between custom runtime and your code is done via REST API that is way less convenient than using language SDKs.
  • You cannot use other AWS APIs via SDKs, only via REST APU
  • Lack of libraries in general: you’ll need to use cinterop literally for every library you want to use!

Right now it seems that Golang is a better alternative for low-footprint Lambdas.

Answering your questions:

Does anybody know reference that point to examples?

See the example above.

Are there any other network clients for Linux?

As of 1.1.2 Ktor supports cURL. The example uses this API.

this could be done with C database drivers with a Kotlin/C interop.

AFAIK, that’s the only option for now.