Lambda
Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations
Inputs
40 / 138
allowed_triggersoptionalmap(any)Map of allowed triggers to create Lambda permissions
{}architecturesoptionallist(string)Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"].
nullartifacts_diroptionalstringDirectory name where artifacts should be stored
buildsassume_role_policy_statementsoptionalanyMap of dynamic policy statements for assuming Lambda Function role (trust relationship)
{}attach_async_event_policyoptionalboolControls whether async event policy should be added to IAM role for Lambda Function
falseattach_cloudwatch_logs_policyoptionalboolControls whether CloudWatch Logs policy should be added to IAM role for Lambda Function
trueattach_create_log_group_permissionoptionalboolControls whether to add the create log group permission to the CloudWatch logs policy
trueattach_dead_letter_policyoptionalboolControls whether SNS/SQS dead letter notification policy should be added to IAM role for Lambda Function
falseattach_network_policyoptionalboolControls whether VPC/network policy should be added to IAM role for Lambda Function
falseattach_policiesoptionalboolControls whether list of policies should be added to IAM role for Lambda Function
falseattach_policyoptionalboolControls whether policy should be added to IAM role for Lambda Function
falseattach_policy_jsonoptionalboolControls whether policy_json should be added to IAM role for Lambda Function
falseattach_policy_jsonsoptionalboolControls whether policy_jsons should be added to IAM role for Lambda Function
falseattach_policy_statementsoptionalboolControls whether policy_statements should be added to IAM role for Lambda Function
falseattach_tracing_policyoptionalboolControls whether X-Ray tracing policy should be added to IAM role for Lambda Function
falseauthorization_typeoptionalstringThe type of authentication that the Lambda Function URL uses. Set to 'AWS_IAM' to restrict access to authenticated IAM users only. Set to 'NONE' to bypass IAM authentication and create a public endpoint.
NONEbuild_in_dockeroptionalboolWhether to build dependencies in Docker
falsecloudwatch_logs_deletion_protection_enabledoptionalboolWhether to enable deletion protection for the log group.
nullcloudwatch_logs_kms_key_idoptionalstringThe ARN of the KMS Key to use when encrypting log data.
nullcloudwatch_logs_log_group_classoptionalstringSpecified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS`
nullcloudwatch_logs_retention_in_daysoptionalnumberSpecifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
nullcloudwatch_logs_skip_destroyoptionalboolWhether to keep the log group (and any logs it may contain) at destroy time.
falsecloudwatch_logs_tagsoptionalmap(string)A map of tags to assign to the resource.
{}code_signing_config_arnoptionalstringAmazon Resource Name (ARN) for a Code Signing Configuration
nullcompatible_architecturesoptionallist(string)A list of Architectures Lambda layer is compatible with. Currently x86_64 and arm64 can be specified.
nullcompatible_runtimesoptionallist(string)A list of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
[]corsoptionalanyCORS settings to be used by the Lambda Function URL
{}createoptionalboolControls whether resources should be created
truecreate_async_event_configoptionalboolControls whether async event configuration for Lambda Function/Alias should be created
falsecreate_current_version_allowed_triggersoptionalboolWhether to allow triggers on current version of Lambda Function (this will revoke permissions from previous version because Terraform manages only current resources)
truecreate_current_version_async_event_configoptionalboolWhether to allow async event configuration on current version of Lambda Function (this will revoke permissions from previous version because Terraform manages only current resources)
truecreate_functionoptionalboolControls whether Lambda Function resource should be created
truecreate_lambda_function_urloptionalboolControls whether the Lambda Function URL resource should be created
falsecreate_layeroptionalboolControls whether Lambda Layer resource should be created
falsecreate_packageoptionalboolControls whether Lambda package should be created
truecreate_roleoptionalboolControls whether IAM role for Lambda Function should be created
truecreate_sam_metadataoptionalboolControls whether the SAM metadata null resource should be created
falsecreate_unqualified_alias_allowed_triggersoptionalboolWhether to allow triggers on unqualified alias pointing to $LATEST version
truecreate_unqualified_alias_async_event_configoptionalboolWhether to allow async event configuration on unqualified alias pointing to $LATEST version
truecreate_unqualified_alias_lambda_function_urloptionalboolWhether to use unqualified alias pointing to $LATEST version in Lambda Function URL
trueAll 138 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 98 are in the source.
Outputs
35
lambda_cloudwatch_log_group_arnThe ARN of the Cloudwatch Log Group
lambda_cloudwatch_log_group_nameThe name of the Cloudwatch Log Group
lambda_event_source_mapping_arnThe event source mapping ARN
lambda_event_source_mapping_function_arnThe the ARN of the Lambda function the event source mapping is sending events to
lambda_event_source_mapping_stateThe state of the event source mapping
lambda_event_source_mapping_state_transition_reasonThe reason the event source mapping is in its current state
lambda_event_source_mapping_uuidThe UUID of the created event source mapping
lambda_function_arnThe ARN of the Lambda Function
lambda_function_arn_staticThe static ARN of the Lambda Function. Use this to avoid cycle errors between resources (e.g., Step Functions)
lambda_function_code_sha256The base64-encoded representation of the source code package file
lambda_function_invoke_arnThe Invoke ARN of the Lambda Function
lambda_function_kms_key_arnThe ARN for the KMS encryption key of Lambda Function
lambda_function_last_modifiedThe date Lambda Function resource was last modified
lambda_function_nameThe name of the Lambda Function
lambda_function_qualified_arnThe ARN identifying your Lambda Function Version
lambda_function_qualified_invoke_arnThe Invoke ARN identifying your Lambda Function Version
lambda_function_signing_job_arnARN of the signing job
lambda_function_signing_profile_version_arnARN of the signing profile version
lambda_function_source_code_hashThe user-defined hash of the source code package file
lambda_function_source_code_sizeThe size in bytes of the function .zip file
lambda_function_urlThe URL of the Lambda Function URL
lambda_function_url_idThe Lambda Function URL generated id
lambda_function_versionLatest published version of Lambda Function
lambda_layer_arnThe ARN of the Lambda Layer with version
lambda_layer_code_sha256The base64-encoded representation of the Lambda Layer source code package file
lambda_layer_created_dateThe date Lambda Layer resource was created
lambda_layer_layer_arnThe ARN of the Lambda Layer without version
lambda_layer_source_code_hashThe user-defined hash of the Lambda Layer source code package file
lambda_layer_source_code_sizeThe size in bytes of the Lambda Layer .zip file
lambda_layer_versionThe Lambda Layer version
lambda_role_arnThe ARN of the IAM role created for the Lambda Function
lambda_role_nameThe name of the IAM role created for the Lambda Function
lambda_role_unique_idThe unique id of the IAM role created for the Lambda Function
local_filenameThe filename of zip archive deployed (if deployment was from local)
s3_objectThe map with S3 object data of zip archive deployed (if deployment was from S3)
What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.