Packaging and deploying

To package a Kotlin Lambda function using Gradle on Unix-based systems, use the following command:

./gradlew clean shadow

This yields /build/libs/ greeter-1.0.0.jar, which can be uploaded as a deployment package in the console, like we did for the Java Lambda function.

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.