mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
23 lines
484 B
HCL
23 lines
484 B
HCL
resource "aws_sqs_queue" "this" {
|
|
name = "${var.name}-queue"
|
|
tags = var.tags
|
|
}
|
|
|
|
resource "aws_lambda_function" "this" {
|
|
function_name = var.name
|
|
role = var.lambda_role_arn
|
|
|
|
package_type = "Image"
|
|
image_uri = var.image_uri
|
|
|
|
timeout = var.timeout
|
|
|
|
tags = var.tags
|
|
}
|
|
|
|
resource "aws_lambda_event_source_mapping" "this" {
|
|
event_source_arn = aws_sqs_queue.this.arn
|
|
function_name = aws_lambda_function.this.arn
|
|
|
|
batch_size = var.sqs_batch_size
|
|
}
|