I'm looking for a #serverless solution using kotli...
# server
v
I'm looking for a #serverless solution using kotlin on aws. There is #kotless, which looks good but is very young, and Osiris, which is very quiet on github. Any others?
c
I’m not too familiar with it, but you can use Java with Serverless Framework. Here’s an article in their docs using Maven, so you should be able to adapt it pretty easily to using Kotlin instead https://www.serverless.com/blog/how-to-create-a-rest-api-in-java-using-dynamodb-and-serverless/
c
Note that the downside to Java for serverless is the spin up time of the JVM. If your Kotlin solution is also on the JVM you'll likely also suffer this if your lambdas are rarely used.
v
Thanks all. This is a learning exercise for me, so performance isn't a major concern. I'm also keen to avoid Spring - nothing with too much magic, as I'd like to learn what's going on under the hood.
👍 2
c
@v79 I think you can write kotlin serverless with https://quarkus.io/
b
r
If it's a learning exercise I think it would be wise to determine WHAT you want to learn. In my opinion it's inevitable to learn some AWS when you're running on that. Even if you use frameworks such as serverless or kotless you still need to have a bit of knowledge of the underlying infra. For me the best way to start learning is to use the least amount of frameworks so also no magic and do it all yourself. Concrete that would mean creating a Gradle project and using the AWS Java SDK from
com.amazonaws:aws-lambda*
which work fine in Kotlin of course. Then you could also add the Gradle plugin
jp.classmethod.aws.lambda
for easily creating an archive and deploy it directly to your AWS account
v
Thanks @Rachid, you've understood what I'm trying to do. The challenge is that there are so many things to learn all at once, so I have to pick and choose my battles. I'm still working in my day-job so this is just a side-project for me!