Class LambdaConfig.Builder

Enclosing class:
LambdaConfig

public static class LambdaConfig.Builder extends AbstractServiceConfigBuilder<LambdaConfig.Builder,LambdaConfig>
Builder for LambdaConfig.
  • Method Details

    • ephemeral

      public LambdaConfig.Builder ephemeral(boolean ephemeral)
      Sets whether Lambda containers are removed after each invocation.
      Parameters:
      ephemeral - true to remove containers after each invocation (default false)
      Returns:
      this builder
    • exposeRuntimePorts

      public LambdaConfig.Builder exposeRuntimePorts(boolean exposeRuntimePorts)
      Sets whether the Lambda Runtime API ports should be exposed on the host machine.
      Parameters:
      exposeRuntimePorts - true to expose Runtime API ports (default false)
      Returns:
      this builder
    • defaultMemoryMb

      public LambdaConfig.Builder defaultMemoryMb(int defaultMemoryMb)
      Sets the default memory size for Lambda functions in megabytes.
      Parameters:
      defaultMemoryMb - memory in MB (default 128)
      Returns:
      this builder
    • defaultTimeoutSeconds

      public LambdaConfig.Builder defaultTimeoutSeconds(int defaultTimeoutSeconds)
      Sets the default timeout for Lambda function invocations in seconds.
      Parameters:
      defaultTimeoutSeconds - timeout in seconds (default 3)
      Returns:
      this builder
    • dockerNetwork

      public LambdaConfig.Builder dockerNetwork(String dockerNetwork)
      Sets the Docker network that Lambda containers should join.
      Parameters:
      dockerNetwork - the network name, or null to use default network
      Returns:
      this builder
    • runtimeApiPortRange

      public LambdaConfig.Builder runtimeApiPortRange(int basePort, int amount)
      Sets the port range for the Lambda Runtime API.
      Parameters:
      basePort - the base port (default 9200)
      amount - the amount of ports (default 10)
      Returns:
      this builder
    • pollIntervalMs

      public LambdaConfig.Builder pollIntervalMs(int pollIntervalMs)
      Sets the poll interval in milliseconds for Lambda container status checks.
      Parameters:
      pollIntervalMs - interval in milliseconds (default 1000)
      Returns:
      this builder
    • containerIdleTimeoutSeconds

      public LambdaConfig.Builder containerIdleTimeoutSeconds(int containerIdleTimeoutSeconds)
      Sets the idle timeout in seconds after which unused Lambda containers are cleaned up.
      Parameters:
      containerIdleTimeoutSeconds - timeout in seconds (default 300)
      Returns:
      this builder
    • regionConcurrencyLimit

      public LambdaConfig.Builder regionConcurrencyLimit(int regionConcurrencyLimit)
      Sets the per-region concurrent executions ceiling. AWS Lambda's account-level concurrency is per-region (default 1000); Floci mirrors that semantics.
      Parameters:
      regionConcurrencyLimit - the concurrency limit (default 1000)
      Returns:
      this builder
    • unreservedConcurrencyMin

      public LambdaConfig.Builder unreservedConcurrencyMin(int unreservedConcurrencyMin)
      Sets the minimum unreserved concurrency that must remain after PutFunctionConcurrency. Puts that would leave less than this are rejected.
      Parameters:
      unreservedConcurrencyMin - the minimum (default 100)
      Returns:
      this builder
    • hotReload

      public LambdaConfig.Builder hotReload(boolean enabled)
      Sets the hot-reload configuration for development workflows.
      Parameters:
      enabled - whether hot-reload is enabled
      Returns:
      this builder
    • hotReload

      public LambdaConfig.Builder hotReload(boolean enabled, List<String> allowedPaths)
      Sets the hot-reload configuration with allowed paths.
      Parameters:
      enabled - whether hot-reload is enabled
      allowedPaths - optional list of allowed path prefixes
      Returns:
      this builder
    • awsConfigPath

      public LambdaConfig.Builder awsConfigPath(String awsConfigPath)
      Sets the host path to bind-mount (read-only) into Lambda containers at /opt/aws-config. When set, no AWS credential env vars are injected; instead AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE are pointed at the mounted files. Blank values are treated as absent.
      Parameters:
      awsConfigPath - the host path, or null / blank to unset
      Returns:
      this builder
    • build

      public LambdaConfig build()
      Creates an immutable LambdaConfig from this builder.
      Specified by:
      build in class AbstractServiceConfigBuilder<LambdaConfig.Builder,LambdaConfig>
      Returns:
      the Lambda configuration