Skip to content

Web Application configuration

Vladislav.Tankov edited this page Jun 13, 2020 · 4 revisions

Web Application configuration in a Kotless gradle plugin defines project-specific deployment configuration.

You may set route53 variable — it defines a Route53 alias for your application. You will need an ACM certificate in us-east-1 to create it.

It is possible to configure lambda parameters — you should use lambda function for it. You can set a timeout of lambda, memory in MB, and autowarm configuration.

In case you use Kotless DSL you may define kotless { ... } closure in lambda and set the packages that will be used by Kotless during introspection. Otherwise, those packages will be taken from Gradle module group.

Here is a simple snippet of the Web Application configuration:

kotless {
    //<...> - Web Application config
    webapp {
        route53 = Route53("kotless", "example.com")

        lambda {
            timeoutSec = 300
            memoryMb = 512
    
            //needed only for Kotless DSL
            kotless {
                //Define packages in which scan for routes should be performed
                packages = setOf("io.kotless.examples")
            }
        }
    }
    //<...> - Extension config
}