blankface
blankface

Reputation: 6347

Map two stream event sources to the same lambda

According to AWS documentation, it is possible to map multiple event sources (in my case Kinesis stream) to the same lambda.

In Terraform documentation, aws_lambda_event_source_mapping only shows one event_source_arn mapped to one lambda function

I couldn't find any further examples. How can I go about doing this mapping?

Upvotes: 0

Views: 797

Answers (1)

Marcin
Marcin

Reputation: 238139

You will have to create two aws_lambda_event_source_mapping resources. For example:

resource "aws_lambda_event_source_mapping" "kinesis1" {
 # ...
}

resource "aws_lambda_event_source_mapping" "kinesis2" {
 # ...
}

Depending on how you want to custuct them, you can also use count or for_each instead of explicitly creating two different versions of aws_lambda_event_source_mapping.

Upvotes: 2

Related Questions