Name | Version |
---|---|
terraform | >= 1.3.0, < 2.0.0 |
archive | ~> 2.3.0 |
aws | ~> 6.5.0 |
Name | Version |
---|---|
archive | ~> 2.3.0 |
aws | ~> 6.5.0 |
No modules.
Name | Type |
---|---|
aws_cloudwatch_log_group.lambda_logs | resource |
aws_iam_policy.lambda_policy | resource |
aws_iam_role.lambda_role | resource |
aws_iam_role_policy_attachment.lambda_attach | resource |
aws_lambda_function.lambda | resource |
archive_file.lambda | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
assumed_by_service | Service principal allowed to assume the role | string |
"lambda.amazonaws.com" |
no |
create_role | Whether to create an IAM role for the Lambda | bool |
true |
no |
default_tags | Baseline tags applied across all modules | map(string) |
{} |
no |
deploy_via_s3 | If true, deploy from S3; if false, package locally | bool |
false |
no |
environment_variables | Map of environment variables for the Lambda | map(string) |
{} |
no |
function_name | Name of the Lambda function | string |
"example-lambda" |
no |
handler | Function entrypoint in the code | string |
"index.handler" |
no |
kms_key_id | KMS key ARN for encrypting logs (optional) | string |
null |
no |
log_retention_days | Number of days to retain logs in CloudWatch | number |
7 |
no |
memory_size | Amount of memory in MB your Lambda can use | number |
128 |
no |
output_path | Path to output the packaged zip file | string |
"lambda.zip" |
no |
policy_actions | List of IAM actions to allow in the Lambda's policy | list(string) |
[ |
no |
policy_resources | List of resources the IAM policy applies to | list(string) |
[ |
no |
role_arn | Existing IAM role ARN to use (required if create_role = false) | string |
null |
no |
role_name | Name of the IAM role to create | string |
null |
no |
runtime | Lambda runtime environment | string |
"python3.11" |
no |
s3_bucket | S3 bucket name for deployment package | string |
null |
no |
s3_key | S3 key for deployment package | string |
null |
no |
source_code_hash | Base64-encoded SHA256 hash of the deployment package | string |
null |
no |
source_file | Path to local source file for packaging | string |
"index.py" |
no |
tags | Optional tags to override or extend default_tags | map(string) |
{} |
no |
timeout | Function execution timeout in seconds | number |
3 |
no |
Name | Description |
---|---|
lambda_arn | ARN of the created Lambda function |
lambda_name | Name of the created Lambda function |
lambda_role_arn | IAM role assigned to the Lambda function |
log_group_name | Name of the CloudWatch log group for the Lambda |