Class LambdaConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<LambdaConfig.Builder,LambdaConfig>
io.floci.testcontainers.config.services.LambdaConfig.Builder
- Enclosing class:
- LambdaConfig
public static class LambdaConfig.Builder
extends AbstractServiceConfigBuilder<LambdaConfig.Builder,LambdaConfig>
Builder for
LambdaConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionawsConfigPath(String awsConfigPath) Sets the host path to bind-mount (read-only) into Lambda containers at/opt/aws-config.build()Creates an immutableLambdaConfigfrom this builder.containerIdleTimeoutSeconds(int containerIdleTimeoutSeconds) Sets the idle timeout in seconds after which unused Lambda containers are cleaned up.defaultMemoryMb(int defaultMemoryMb) Sets the default memory size for Lambda functions in megabytes.defaultTimeoutSeconds(int defaultTimeoutSeconds) Sets the default timeout for Lambda function invocations in seconds.dockerNetwork(String dockerNetwork) Sets the Docker network that Lambda containers should join.ephemeral(boolean ephemeral) Sets whether Lambda containers are removed after each invocation.exposeRuntimePorts(boolean exposeRuntimePorts) Sets whether the Lambda Runtime API ports should be exposed on the host machine.hotReload(boolean enabled) Sets the hot-reload configuration for development workflows.Sets the hot-reload configuration with allowed paths.pollIntervalMs(int pollIntervalMs) Sets the poll interval in milliseconds for Lambda container status checks.regionConcurrencyLimit(int regionConcurrencyLimit) Sets the per-region concurrent executions ceiling.runtimeApiPortRange(int basePort, int amount) Sets the port range for the Lambda Runtime API.unreservedConcurrencyMin(int unreservedConcurrencyMin) Sets the minimum unreserved concurrency that must remain afterPutFunctionConcurrency.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
ephemeral
Sets whether Lambda containers are removed after each invocation.- Parameters:
ephemeral-trueto remove containers after each invocation (default false)- Returns:
- this builder
-
exposeRuntimePorts
Sets whether the Lambda Runtime API ports should be exposed on the host machine.- Parameters:
exposeRuntimePorts-trueto expose Runtime API ports (default false)- Returns:
- this builder
-
defaultMemoryMb
Sets the default memory size for Lambda functions in megabytes.- Parameters:
defaultMemoryMb- memory in MB (default 128)- Returns:
- this builder
-
defaultTimeoutSeconds
Sets the default timeout for Lambda function invocations in seconds.- Parameters:
defaultTimeoutSeconds- timeout in seconds (default 3)- Returns:
- this builder
-
dockerNetwork
Sets the Docker network that Lambda containers should join.- Parameters:
dockerNetwork- the network name, ornullto use default network- Returns:
- this builder
-
runtimeApiPortRange
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
Sets the poll interval in milliseconds for Lambda container status checks.- Parameters:
pollIntervalMs- interval in milliseconds (default 1000)- Returns:
- this builder
-
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
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
Sets the minimum unreserved concurrency that must remain afterPutFunctionConcurrency. Puts that would leave less than this are rejected.- Parameters:
unreservedConcurrencyMin- the minimum (default 100)- Returns:
- this builder
-
hotReload
Sets the hot-reload configuration for development workflows.- Parameters:
enabled- whether hot-reload is enabled- Returns:
- this builder
-
hotReload
Sets the hot-reload configuration with allowed paths.- Parameters:
enabled- whether hot-reload is enabledallowedPaths- optional list of allowed path prefixes- Returns:
- this builder
-
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; insteadAWS_SHARED_CREDENTIALS_FILEandAWS_CONFIG_FILEare pointed at the mounted files. Blank values are treated as absent.- Parameters:
awsConfigPath- the host path, ornull/ blank to unset- Returns:
- this builder
-
build
Creates an immutableLambdaConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<LambdaConfig.Builder,LambdaConfig> - Returns:
- the Lambda configuration
-