This module creates a lambda function and a role. It also has toggles for the various ways lambdas are invoked at CDS.
No requirements.
Name | Version |
---|---|
aws | n/a |
No modules.
Name | Type |
---|---|
aws_cloudwatch_log_group.this | resource |
aws_cloudwatch_query_definition.lambda_statistics | resource |
aws_iam_policy.non_vpc_policies | resource |
aws_iam_policy.policies | resource |
aws_iam_policy.vpc_policies | resource |
aws_iam_role.this | resource |
aws_iam_role_policy_attachment.AWSLambdaVPCAccessExecutionRole | resource |
aws_iam_role_policy_attachment.attachments | resource |
aws_iam_role_policy_attachment.lambda_insights | resource |
aws_iam_role_policy_attachment.non_vpc_policies | resource |
aws_iam_role_policy_attachment.vpc_policies | resource |
aws_lambda_alias.this | resource |
aws_lambda_function.this | resource |
aws_lambda_permission.api_gateway | resource |
aws_lambda_permission.s3_execution | resource |
aws_lambda_permission.sns | resource |
aws_s3_bucket_notification.this | resource |
aws_iam_policy.lambda_insights | data source |
aws_iam_policy_document.non_vpc_policies | data source |
aws_iam_policy_document.service_principal | data source |
aws_iam_policy_document.vpc_policies | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
alias_name | (Optional, default '') Lambda function's alias name | string |
"" |
no |
allow_api_gateway_invoke | (Optional) Allow API Gateway to invoke the lambda | bool |
false |
no |
allow_s3_execution | (Optional) Allow S3 to execute the lambda | bool |
false |
no |
api_gateway_source_arn | (Optional) The api gateway rest point that can call the lambda | string |
"" |
no |
architectures | (Optional) The architectures that the lambda can run on | list(any) |
[ |
no |
billing_tag_key | (Optional, default 'CostCentre') The name of the billing tag | string |
"CostCentre" |
no |
billing_tag_value | (Required) The value of the billing tag | string |
n/a | yes |
bucket | (Optional) S3 bucket that is triggering the lambda | object({ |
{ |
no |
dead_letter_queue_arn | (Optional) The arn of the dead letter queue | string |
"" |
no |
ecr_arn | (Optional) The arn of the ecr repository the image resides in the lambda will be given access to pull images and layers from this registry | string |
n/a | yes |
enable_lambda_insights | (Optional) Enable Lambda Insights | bool |
true |
no |
environment_variables | (Optional) Environment variables to pass to the lambda | map(string) |
{} |
no |
ephemeral_storage | (Optional) Set the Lambda function's ephemeral storage to a value between 512MB and 10240MB. | number |
512 |
no |
file_system_config | (Optional) Configuration to connect EFS to a Lambda function. | map(string) |
{} |
no |
image_uri | (Required) Docker image URI | string |
n/a | yes |
log_group_retention_period | (Optional) Override the retention period for the lambda log group | number |
14 |
no |
memory | (Optional) Memory in MB | number |
128 |
no |
name | (Required) Name of the lambda | string |
n/a | yes |
policies | (Optional) List of policies to attach to the Lambda function | list(string) |
[] |
no |
publish | (Optional, default 'false') Whether to publish creation/change as new Lambda Function Version. | bool |
false |
no |
reserved_concurrent_executions | (Optional) Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency | number |
-1 |
no |
sns_topic_arns | (Optional) SNS triggers to attach to the Lambda function | list(string) |
[] |
no |
timeout | (Optional) Timeout in seconds | number |
3 |
no |
vpc | (Optional) VPC to attach to the Lambda function **Please Note if this is set it will also attach the AWSLambdaVPCAccessExecutionRole to the lmabda this will enable creation of VPC ENI's as well as reading and writing to logfiles |
object({ |
{ |
no |
Name | Description |
---|---|
function_arn | ARN of the Lambda function. |
function_name | Name of the Lambda function. |
function_role_arn | ARN of the Lambda function execution role. |
function_version | Version of the Lambda function. |
invoke_arn | ARN used to invoke the Lambda function. |