Class LambdaConfig


public class LambdaConfig extends AbstractServiceConfig<LambdaConfig.Builder>
Configuration for Lambda-specific container settings.

Instances are created via LambdaConfig.Builder:


 LambdaConfig config = LambdaConfig.builder()
     .enabled(true)
     .runtimeApiPortRange(9300, 10)
     .defaultMemoryMb(256)
     .build();
 
  • Method Details

    • builder

      public static LambdaConfig.Builder builder()
      Returns a new LambdaConfig.Builder for this configuration.
      Returns:
      a new builder
    • toBuilder

      public LambdaConfig.Builder toBuilder()
      Returns a new LambdaConfig.Builder for this configuration, initialized with the current values of this instance.
      Specified by:
      toBuilder in class AbstractServiceConfig<LambdaConfig.Builder>
      Returns:
      a new builder pre-populated with this configuration's values
    • isEphemeral

      public boolean isEphemeral()
      Returns whether Lambda containers are removed after each invocation.
      Returns:
      true if containers are ephemeral
    • isExposeRuntimePorts

      public boolean isExposeRuntimePorts()
      Returns whether the Lambda Runtime API ports should be exposed on the host machine.
      Returns:
      true if Runtime API ports are exposed
    • getDefaultMemoryMb

      public int getDefaultMemoryMb()
      Returns the default memory size for Lambda functions in megabytes.
      Returns:
      memory in MB
    • getDefaultTimeoutSeconds

      public int getDefaultTimeoutSeconds()
      Returns the default timeout for Lambda function invocations in seconds.
      Returns:
      timeout in seconds
    • getDockerNetwork

      public String getDockerNetwork()
      Returns the Docker network used for Lambda containers, or null if not set.
      Returns:
      the Docker network name, or null
    • getRuntimeApiBasePort

      public int getRuntimeApiBasePort()
      Returns the base port for the Lambda Runtime API port range.
      Returns:
      the base port
    • getRuntimeApiPortsCount

      public int getRuntimeApiPortsCount()
      Returns the number of ports allocated for the Lambda Runtime API.
      Returns:
      the port count
    • getRuntimeApiMaxPort

      public int getRuntimeApiMaxPort()
      Returns the highest port for the Lambda Runtime API port range.
      Returns:
      the highest port in the range
    • getPollIntervalMs

      public int getPollIntervalMs()
      Returns the poll interval in milliseconds for Lambda container status checks.
      Returns:
      interval in milliseconds
    • getContainerIdleTimeoutSeconds

      public int getContainerIdleTimeoutSeconds()
      Returns the idle timeout in seconds after which unused Lambda containers are cleaned up.
      Returns:
      timeout in seconds
    • getRegionConcurrencyLimit

      public int getRegionConcurrencyLimit()
      Returns the per-region concurrent executions ceiling.
      Returns:
      the region concurrency limit
    • getUnreservedConcurrencyMin

      public int getUnreservedConcurrencyMin()
      Returns the minimum unreserved concurrency that must remain after PutFunctionConcurrency.
      Returns:
      the unreserved concurrency minimum
    • getHotReload

      public LambdaConfig.HotReload getHotReload()
      Returns the hot-reload configuration for development workflows.
      Returns:
      the hot-reload configuration
    • getAwsConfigPath

      public String getAwsConfigPath()
      Returns the host path to bind-mount (read-only) into Lambda containers at /opt/aws-config, or null if not set.

      When present, no AWS credential env vars are injected; instead AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE are set to point at the mounted files. Blank values are treated as absent.

      Returns:
      the AWS config path, or null if not configured
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by setting the appropriate environment variables.
      Overrides:
      applyEnvVarsToContainer in class AbstractServiceConfig<LambdaConfig.Builder>
      Parameters:
      container - the container to configure
    • applyExposedPortsToContainer

      public void applyExposedPortsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by exposing the appropriate ports.
      Overrides:
      applyExposedPortsToContainer in class AbstractServiceConfig<LambdaConfig.Builder>
      Parameters:
      container - the container to configure