Create environment dependencies for Lambda functions:
- IAM role
- Permissions
- CloudWatch Log Group
Example:
module "lambda_base" {
source = "github.com/andreswebs/terraform-aws-lambda-base"
name = "demo"
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
log_group_prefix | The log group prefix | string |
"/aws/lambda" |
no |
log_retention_in_days | The number of days to retain the log events in the log group | number |
30 |
no |
name | Generic service name, used to name module resources | string |
n/a | yes |
service | The service principal for the role. Can be 'lambda' or 'states' | string |
"lambda" |
no |
vpc_permissions_enabled | (Optional) Whether to enable VPC permissions for the execution role | bool |
false |
no |
No modules.
Name | Description |
---|---|
iam_role | The aws_iam_role resource |
log_group | The aws_cloudwatch_log_group resource |
Name | Version |
---|---|
aws | n/a |
Name | Version |
---|---|
terraform | ~> 1.3 |
Name | Type |
---|---|
aws_cloudwatch_log_group.this | resource |
aws_iam_role.exec | resource |
aws_iam_role_policy.service_permissions | resource |
aws_iam_role_policy_attachment.cloudwatch_lambda_insights | resource |
aws_iam_role_policy_attachment.xray | resource |
aws_caller_identity.current | data source |
aws_iam_policy_document.log_permissions | data source |
aws_iam_policy_document.service_permissions | data source |
aws_iam_policy_document.service_trust | data source |
aws_iam_policy_document.vpc_permissions | data source |
aws_partition.current | data source |
aws_region.current | data source |
Andre Silva @andreswebs
This project is licensed under the Unlicense.