queue-driven-lambda
bmd/queue-driven-lambda/aws
Easily create SQS-fed Lambda functions
Queue-Fed Lambda Terraform Module This module abstracts the newly-supported pattern of triggering a Lambda function directly from an SQS queue, and handles provisioning the Lambda, queue, a dead-letter queue to hold failed messages, and a Cloudwatch log group for the Lambda's invocation and function logs. The high level architecture of this module is easy to visualize: !Architecture You can read more about the design principles in and use-cases AWS's introduction to the pattern. Quickstart ``terraform module "q_lambda" { source "bmd/queue-driven-lambda/aws" project_prefix = "qfl-test" filename = "example.zip" function_name = "my_lambda_fn" handler = "index.handle" runtime = "go1.x" lambda_iam_role = aws_iam_role.test_iam.arn event_batch_size = 1 } ` A complete example of the minimal code r
| Name | Type | Description | Default |
|---|---|---|---|
| lambda_iam_role | string | IAM role attached to the Lambda Function. This governs both who / what can invok | required |
| filename | string | The path to the function's deployment package within the local filesystem. For m | required |
| runtime | string | See https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-Cre | required |
| function_name | string | A unique name for your Lambda Function. This will also be used as a prefix for n | required |
| handler | string | The function entrypoint in your code. | required |
| max_receive_count | number | The number of times a message should be replayed before it's sent to the deadlet | 5 |
| timeout | number | The amount of time your Lambda Function has to run in seconds. Defaults to 3. | 3 |
| message_retention_seconds | number | The number of seconds Amazon SQS retains a message. Integer representing seconds | 345600 |
| reserved_concurrent_executions | string | The amount of reserved concurrent executions for this lambda function. A value o | "-1" |
| max_message_size | number | The limit of how many bytes a message can contain before Amazon SQS rejects it. | 262144 |
| log_retention_in_days | number | The number of days to retain the Lambda's CloudWatch execution logs for. The def | 14 |
| memory_size | number | Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. | 128 |
| description | string | Description of what your Lambda Function does. | "" |
| publish | bool | Whether to publish creation/change as new Lambda Function Version. Defaults to f | false |
| event_source_enabled | bool | Whether the event mapping between the SQS Queue and Lambda should be enabled on | true |
| event_batch_size | number | The largest number of records that Lambda will retrieve from the SQS queue at th | 10 |
| dlq_message_retention_seconds | number | The message retention settings for the Deadletter Queue. See the description for | 345600 |
| environment | map(map(string)) | The Lambda environment's configuration settings. See the official module's docum | {} |
task_queue_id — The URL of the task queuetask_queue_arn — The ARN of the task queuedeadletter_queue_id — The URL of the deadletter queue (if created)deadletter_queue_arn — The ARN of the deadletter queue (if created)log_stream_arn — The ARN if the Lambda's Cloudwatch Logs stream (if created)Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,