Skip to main content
Version: v1.7



Terraform module creating a Lambda function with inline code



archive_fileAn instance of the archive_file data source containing the code of the Lambda function. Conflicts with source_dir.object({\n output_path = string\n output_base64sha256 = string\n })false
cloudwatch_log_group_retention_in_daysThe number of days to retain the log of the Lambda function.numberfalse
descriptionDescription of the Lambda function.stringtrue
environment_variablesEnvironment variable key-value
function_nameName of the Lambda function.stringtrue
handlerThe name of the method within your code that Lambda calls to execute your function.stringtrue
layersList of up to five Lambda layer ARNs.list(string)false
memory_sizeThe amount of memory (in MB) available to the function at runtime. Increasing the Lambda function memory also increases its CPU allocation.numbertrue
reserved_concurrent_executionsThe number of simultaneous executions to reserve for the Lambda function.numbertrue
runtimeThe identifier of the Lambda function runtime.stringtrue
secret_environment_variablesMap of environment variable names to ARNs of AWS Secret Manager secrets.\n\nEach ARN will be passed as environment variable to the lambda function with the key's name extended by suffix _SECRET_ARN. When initializing the Lambda run time environment, the Lambda function or a wrapper script can look up the secret value.\n\nPermission will be added allowing the Lambda function to read the secret values.\nmap(string)false
source_dirPath of the directory which shall be packed as code of the Lambda function. Conflicts with archive_file.stringfalse
tagsTags which will be assigned to all
timeoutThe amount of time (in seconds) per execution before stopping it.numbertrue
writeConnectionSecretToRefThe secret which the cloud resource connection will be written towriteConnectionSecretToReffalse


nameThe secret name which the cloud resource connection will be written tostringtrue
namespaceThe secret namespace which the cloud resource connection will be written tostringfalse