Maps an Amazon MQ (ActiveMQ) broker to a Lambda function, including authentication configuration.

Terraform Template

resource "aws_lambda_event_source_mapping" "example" {
  batch_size = 10
  enabled = true
  event_source_arn = "aws_mq_broker.example.arn"
  function_name = "aws_lambda_function.example.arn"
  queues = ["example"]

  source_access_configuration {
    type = "BASIC_AUTH"
    uri = "aws_secretsmanager_secret_version.example.arn"
  }
}