Skip to content

Latest commit

 

History

History
50 lines (45 loc) · 5.73 KB

readme.md

File metadata and controls

50 lines (45 loc) · 5.73 KB

Kafka2SQS Lambda consumer

Requirements

Name Version
terraform >= 0.15
aws >= 3.74.3

Inputs

Name Description Type Default Required
function_name Lambda function name string "kafka-consumer" no
function_timeout Lambda timeout in seconds number 60 no
function_vpc_config VPC configuration for the lambda
object({
subnet_ids = list(string)
security_group_ids = list(string)
})
{
"security_group_ids": [],
"subnet_ids": []
}
no
kafka_authentication_type The authentication to perform to connect to kafka. Possible values are: "SASL" or "mTLS". string n/a yes
kafka_batch_size The largest number of records that Lambda will retrieve from each kafka topic number 10 no
kafka_ca_secret_arn The arn of the secret containing the ca certificate in PEM format string "" no
kafka_credentials_arn The arn of the secret containing the kafka credentials. The content dependes on the "kafka_authentication_type" var. string "" no
kafka_endpoints Comma separated kafka endpoints : string n/a yes
kafka_starting_position The position in the stream where AWS Lambda should start reading. Supported values are: LATEST, TRIM_HORIZON string "TRIM_HORIZON" no
kafka_topics Kafka topics definition
list(object({
topic_name = string
is_avro = bool
}))
n/a yes
kafka_vpc_config VPC configuration for the kafka event source
object({
subnet_ids = list(string)
security_group_ids = list(string)
})
{
"security_group_ids": [],
"subnet_ids": []
}
no
log_group_retention_days Cloudwatch log group retention in days number 30 no
message_retention_seconds The number of seconds the SQS retains a message. Used for queue and dlq. number 1209600 no
queue_name Name of the SQS queue name string "consumer_sqs" no
receive_wait_time_seconds SQS Long polling configureation. number 0 no
schema_registry_credentials_arn Secret containing the username and password to connect to schema registry string "" no
schema_registry_endpoint Schema registry endpoint including the protocol (i.e. https://...). string "" no
visibility_timeout_seconds Visibility timeout for both queues (main and sqs) number 30 no

Outputs

Name Description
dead_letter_queue DLQ used when the lambda is not able to parse the record.
queue Queue output

Resources

Name Type
aws_cloudwatch_log_group.consumer_lambda_logging resource
aws_iam_role.consumer resource
aws_iam_role_policy.logs_policy resource
aws_iam_role_policy.secrets_getter resource
aws_iam_role_policy.sqs_publisher resource
aws_iam_role_policy.vpc_permissions resource
aws_lambda_event_source_mapping.event_source resource
aws_lambda_function.lambda resource
aws_sqs_queue.dlq resource
aws_sqs_queue.queue resource