Skip to main content

Execution Unit

@klotho::execution_unit

Execution unit is the smallest deployable grouping of code. The annotation does not necessarily guarantee the code will end up in separate units: it just defines the ability to be split. The absence of an execution_unit capability in a file implies that it goes in all units.

Klotho will make a best effort attempt to remove any dead code from execution units.

note

Currently, units are always split, with no mechanism for recombining them. The ability to recombine execution units is an upcoming feature.

Directives

DirectiveTypeDescription
idstring(Required) The name of the execution unit. Files with the same execution unit name are guaranteed to stay together.
keep_warmbooleanWarning: Experimental and subject to change.
Whether this execution unit should be kept warm (AWS Lambda only).

Configuration

Execution Units can be further configured within the Klotho configuration.

Providers