AWS v7.43.0, Aug 20 26
AWS v7.43.0, Aug 20 26
Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi
Manages an AWS Lambda Event Source Mapping. Use this resource to connect Lambda functions to event sources like Kinesis, DynamoDB, SQS, Amazon MQ, and Managed Streaming for Apache Kafka (MSK).
For information about Lambda and how to use it, see What is AWS Lambda?. For information about event source mappings, see CreateEventSourceMapping in the API docs.
Example Usage
DynamoDB Stream
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsDynamodbTable.streamArn,
functionName: exampleAwsLambdaFunction.arn,
startingPosition: "LATEST",
tags: {
Name: "dynamodb-stream-mapping",
},
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_dynamodb_table["streamArn"],
function_name=example_aws_lambda_function["arn"],
starting_position="LATEST",
tags={
"Name": "dynamodb-stream-mapping",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsDynamodbTable.StreamArn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
StartingPosition: pulumi.String("LATEST"),
Tags: pulumi.StringMap{
"Name": pulumi.String("dynamodb-stream-mapping"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsDynamodbTable.StreamArn,
FunctionName = exampleAwsLambdaFunction.Arn,
StartingPosition = "LATEST",
Tags =
{
{ "Name", "dynamodb-stream-mapping" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsDynamodbTable.streamArn())
.functionName(exampleAwsLambdaFunction.arn())
.startingPosition("LATEST")
.tags(Map.of("Name", "dynamodb-stream-mapping"))
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsDynamodbTable.streamArn}
functionName: ${exampleAwsLambdaFunction.arn}
startingPosition: LATEST
tags:
Name: dynamodb-stream-mapping
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsDynamodbTable.streamArn
function_name = exampleAwsLambdaFunction.arn
starting_position = "LATEST"
tags = {
"Name" = "dynamodb-stream-mapping"
}
}
Kinesis Stream
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsKinesisStream.arn,
functionName: exampleAwsLambdaFunction.arn,
startingPosition: "LATEST",
batchSize: 100,
maximumBatchingWindowInSeconds: 5,
parallelizationFactor: 2,
destinationConfig: {
onFailure: {
destinationArn: dlq.arn,
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_kinesis_stream["arn"],
function_name=example_aws_lambda_function["arn"],
starting_position="LATEST",
batch_size=100,
maximum_batching_window_in_seconds=5,
parallelization_factor=2,
destination_config={
"on_failure": {
"destination_arn": dlq["arn"],
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
StartingPosition: pulumi.String("LATEST"),
BatchSize: pulumi.Int(100),
MaximumBatchingWindowInSeconds: pulumi.Int(5),
ParallelizationFactor: pulumi.Int(2),
DestinationConfig: &lambda.EventSourceMappingDestinationConfigArgs{
OnFailure: &lambda.EventSourceMappingDestinationConfigOnFailureArgs{
DestinationArn: pulumi.Any(dlq.Arn),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsKinesisStream.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
StartingPosition = "LATEST",
BatchSize = 100,
MaximumBatchingWindowInSeconds = 5,
ParallelizationFactor = 2,
DestinationConfig = new Aws.Lambda.Inputs.EventSourceMappingDestinationConfigArgs
{
OnFailure = new Aws.Lambda.Inputs.EventSourceMappingDestinationConfigOnFailureArgs
{
DestinationArn = dlq.Arn,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingDestinationConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingDestinationConfigOnFailureArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsKinesisStream.arn())
.functionName(exampleAwsLambdaFunction.arn())
.startingPosition("LATEST")
.batchSize(100)
.maximumBatchingWindowInSeconds(5)
.parallelizationFactor(2)
.destinationConfig(EventSourceMappingDestinationConfigArgs.builder()
.onFailure(EventSourceMappingDestinationConfigOnFailureArgs.builder()
.destinationArn(dlq.arn())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsKinesisStream.arn}
functionName: ${exampleAwsLambdaFunction.arn}
startingPosition: LATEST
batchSize: 100
maximumBatchingWindowInSeconds: 5
parallelizationFactor: 2
destinationConfig:
onFailure:
destinationArn: ${dlq.arn}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsKinesisStream.arn
function_name = exampleAwsLambdaFunction.arn
starting_position = "LATEST"
batch_size = 100
maximum_batching_window_in_seconds = 5
parallelization_factor = 2
destination_config = {
on_failure = {
destination_arn = dlq.arn
}
}
}
SQS Queue
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsSqsQueue.arn,
functionName: exampleAwsLambdaFunction.arn,
batchSize: 10,
scalingConfig: {
maximumConcurrency: 100,
},
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_sqs_queue["arn"],
function_name=example_aws_lambda_function["arn"],
batch_size=10,
scaling_config={
"maximum_concurrency": 100,
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsSqsQueue.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
BatchSize: pulumi.Int(10),
ScalingConfig: &lambda.EventSourceMappingScalingConfigArgs{
MaximumConcurrency: pulumi.Int(100),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsSqsQueue.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
BatchSize = 10,
ScalingConfig = new Aws.Lambda.Inputs.EventSourceMappingScalingConfigArgs
{
MaximumConcurrency = 100,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingScalingConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsSqsQueue.arn())
.functionName(exampleAwsLambdaFunction.arn())
.batchSize(10)
.scalingConfig(EventSourceMappingScalingConfigArgs.builder()
.maximumConcurrency(100)
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsSqsQueue.arn}
functionName: ${exampleAwsLambdaFunction.arn}
batchSize: 10
scalingConfig:
maximumConcurrency: 100
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsSqsQueue.arn
function_name = exampleAwsLambdaFunction.arn
batch_size = 10
scaling_config = {
maximum_concurrency = 100
}
}
SQS with Event Filtering
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsSqsQueue.arn,
functionName: exampleAwsLambdaFunction.arn,
filterCriteria: {
filters: [{
pattern: JSON.stringify({
body: {
Temperature: [{
numeric: [
">",
0,
"<=",
100,
],
}],
Location: ["New York"],
},
}),
}],
},
});
import pulumi
import json
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_sqs_queue["arn"],
function_name=example_aws_lambda_function["arn"],
filter_criteria={
"filters": [{
"pattern": json.dumps({
"body": {
"Temperature": [{
"numeric": [
">",
0,
"<=",
100,
],
}],
"Location": ["New York"],
},
}),
}],
})
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]map[string]interface{}{
"body": map[string]interface{}{
"Temperature": []map[string][]interface{}{
map[string][]interface{}{
"numeric": []interface{}{
">",
0,
"<=",
100,
},
},
},
"Location": []string{
"New York",
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsSqsQueue.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
FilterCriteria: &lambda.EventSourceMappingFilterCriteriaArgs{
Filters: lambda.EventSourceMappingFilterCriteriaFilterArray{
&lambda.EventSourceMappingFilterCriteriaFilterArgs{
Pattern: pulumi.String(json0),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsSqsQueue.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs
{
Filters = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs
{
Pattern = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["body"] = new Dictionary<string, object?>
{
["Temperature"] = new[]
{
new Dictionary<string, object?>
{
["numeric"] = new object?[]
{
">",
0,
"<=",
100,
},
},
},
["Location"] = new[]
{
"New York",
},
},
}),
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaFilterArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsSqsQueue.arn())
.functionName(exampleAwsLambdaFunction.arn())
.filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()
.filters(EventSourceMappingFilterCriteriaFilterArgs.builder()
.pattern(serializeJson(
jsonObject(
jsonProperty("body", jsonObject(
jsonProperty("Temperature", jsonArray(jsonObject(
jsonProperty("numeric", jsonArray(
">",
0,
"<=",
100
))
))),
jsonProperty("Location", jsonArray("New York"))
))
)))
.build())
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsSqsQueue.arn}
functionName: ${exampleAwsLambdaFunction.arn}
filterCriteria:
filters:
- pattern:
fn::toJSON:
body:
Temperature:
- numeric:
- '>'
- 0
- <=
- 100
Location:
- New York
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsSqsQueue.arn
function_name = exampleAwsLambdaFunction.arn
filter_criteria = {
filters = [{
"pattern" = jsonencode({
"body" = {
"Temperature" = [{
"numeric" = [">", 0, "<=", 100]
}]
"Location" = ["New York"]
}
})
}]
}
}
Amazon MSK
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsMskCluster.arn,
functionName: exampleAwsLambdaFunction.arn,
topics: [
"orders",
"inventory",
],
startingPosition: "TRIM_HORIZON",
batchSize: 100,
amazonManagedKafkaEventSourceConfig: {
consumerGroupId: "lambda-consumer-group",
},
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_msk_cluster["arn"],
function_name=example_aws_lambda_function["arn"],
topics=[
"orders",
"inventory",
],
starting_position="TRIM_HORIZON",
batch_size=100,
amazon_managed_kafka_event_source_config={
"consumer_group_id": "lambda-consumer-group",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsMskCluster.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
Topics: pulumi.StringArray{
pulumi.String("orders"),
pulumi.String("inventory"),
},
StartingPosition: pulumi.String("TRIM_HORIZON"),
BatchSize: pulumi.Int(100),
AmazonManagedKafkaEventSourceConfig: &lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs{
ConsumerGroupId: pulumi.String("lambda-consumer-group"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsMskCluster.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
Topics = new[]
{
"orders",
"inventory",
},
StartingPosition = "TRIM_HORIZON",
BatchSize = 100,
AmazonManagedKafkaEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs
{
ConsumerGroupId = "lambda-consumer-group",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsMskCluster.arn())
.functionName(exampleAwsLambdaFunction.arn())
.topics(
"orders",
"inventory")
.startingPosition("TRIM_HORIZON")
.batchSize(100)
.amazonManagedKafkaEventSourceConfig(EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs.builder()
.consumerGroupId("lambda-consumer-group")
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsMskCluster.arn}
functionName: ${exampleAwsLambdaFunction.arn}
topics:
- orders
- inventory
startingPosition: TRIM_HORIZON
batchSize: 100
amazonManagedKafkaEventSourceConfig:
consumerGroupId: lambda-consumer-group
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsMskCluster.arn
function_name = exampleAwsLambdaFunction.arn
topics = ["orders", "inventory"]
starting_position = "TRIM_HORIZON"
batch_size = 100
amazon_managed_kafka_event_source_config = {
consumer_group_id = "lambda-consumer-group"
}
}
Self-Managed Apache Kafka
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
functionName: exampleAwsLambdaFunction.arn,
topics: ["orders"],
startingPosition: "TRIM_HORIZON",
selfManagedEventSource: {
endpoints: {
KAFKA_BOOTSTRAP_SERVERS: "kafka1.example.com:9092,kafka2.example.com:9092",
},
},
selfManagedKafkaEventSourceConfig: {
consumerGroupId: "lambda-consumer-group",
},
sourceAccessConfigurations: [
{
type: "VPC_SUBNET",
uri: `subnet:${example1.id}`,
},
{
type: "VPC_SUBNET",
uri: `subnet:${example2.id}`,
},
{
type: "VPC_SECURITY_GROUP",
uri: `security_group:${exampleAwsSecurityGroup.id}`,
},
],
provisionedPollerConfig: {
maximumPollers: 100,
minimumPollers: 10,
pollerGroupName: "group-123",
},
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
function_name=example_aws_lambda_function["arn"],
topics=["orders"],
starting_position="TRIM_HORIZON",
self_managed_event_source={
"endpoints": {
"KAFKA_BOOTSTRAP_SERVERS": "kafka1.example.com:9092,kafka2.example.com:9092",
},
},
self_managed_kafka_event_source_config={
"consumer_group_id": "lambda-consumer-group",
},
source_access_configurations=[
{
"type": "VPC_SUBNET",
"uri": f"subnet:{example1['id']}",
},
{
"type": "VPC_SUBNET",
"uri": f"subnet:{example2['id']}",
},
{
"type": "VPC_SECURITY_GROUP",
"uri": f"security_group:{example_aws_security_group['id']}",
},
],
provisioned_poller_config={
"maximum_pollers": 100,
"minimum_pollers": 10,
"poller_group_name": "group-123",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
Topics: pulumi.StringArray{
pulumi.String("orders"),
},
StartingPosition: pulumi.String("TRIM_HORIZON"),
SelfManagedEventSource: &lambda.EventSourceMappingSelfManagedEventSourceArgs{
Endpoints: pulumi.StringMap{
"KAFKA_BOOTSTRAP_SERVERS": pulumi.String("kafka1.example.com:9092,kafka2.example.com:9092"),
},
},
SelfManagedKafkaEventSourceConfig: &lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs{
ConsumerGroupId: pulumi.String("lambda-consumer-group"),
},
SourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("VPC_SUBNET"),
Uri: pulumi.Sprintf("subnet:%v", example1.Id),
},
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("VPC_SUBNET"),
Uri: pulumi.Sprintf("subnet:%v", example2.Id),
},
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("VPC_SECURITY_GROUP"),
Uri: pulumi.Sprintf("security_group:%v", exampleAwsSecurityGroup.Id),
},
},
ProvisionedPollerConfig: &lambda.EventSourceMappingProvisionedPollerConfigArgs{
MaximumPollers: pulumi.Int(100),
MinimumPollers: pulumi.Int(10),
PollerGroupName: pulumi.String("group-123"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
FunctionName = exampleAwsLambdaFunction.Arn,
Topics = new[]
{
"orders",
},
StartingPosition = "TRIM_HORIZON",
SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs
{
Endpoints =
{
{ "KAFKA_BOOTSTRAP_SERVERS", "kafka1.example.com:9092,kafka2.example.com:9092" },
},
},
SelfManagedKafkaEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs
{
ConsumerGroupId = "lambda-consumer-group",
},
SourceAccessConfigurations = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "VPC_SUBNET",
Uri = $"subnet:{example1.Id}",
},
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "VPC_SUBNET",
Uri = $"subnet:{example2.Id}",
},
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "VPC_SECURITY_GROUP",
Uri = $"security_group:{exampleAwsSecurityGroup.Id}",
},
},
ProvisionedPollerConfig = new Aws.Lambda.Inputs.EventSourceMappingProvisionedPollerConfigArgs
{
MaximumPollers = 100,
MinimumPollers = 10,
PollerGroupName = "group-123",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingProvisionedPollerConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.functionName(exampleAwsLambdaFunction.arn())
.topics("orders")
.startingPosition("TRIM_HORIZON")
.selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()
.endpoints(Map.of("KAFKA_BOOTSTRAP_SERVERS", "kafka1.example.com:9092,kafka2.example.com:9092"))
.build())
.selfManagedKafkaEventSourceConfig(EventSourceMappingSelfManagedKafkaEventSourceConfigArgs.builder()
.consumerGroupId("lambda-consumer-group")
.build())
.sourceAccessConfigurations(
EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("VPC_SUBNET")
.uri(String.format("subnet:%s", example1.id()))
.build(),
EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("VPC_SUBNET")
.uri(String.format("subnet:%s", example2.id()))
.build(),
EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("VPC_SECURITY_GROUP")
.uri(String.format("security_group:%s", exampleAwsSecurityGroup.id()))
.build())
.provisionedPollerConfig(EventSourceMappingProvisionedPollerConfigArgs.builder()
.maximumPollers(100)
.minimumPollers(10)
.pollerGroupName("group-123")
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
functionName: ${exampleAwsLambdaFunction.arn}
topics:
- orders
startingPosition: TRIM_HORIZON
selfManagedEventSource:
endpoints:
KAFKA_BOOTSTRAP_SERVERS: kafka1.example.com:9092,kafka2.example.com:9092
selfManagedKafkaEventSourceConfig:
consumerGroupId: lambda-consumer-group
sourceAccessConfigurations:
- type: VPC_SUBNET
uri: subnet:${example1.id}
- type: VPC_SUBNET
uri: subnet:${example2.id}
- type: VPC_SECURITY_GROUP
uri: security_group:${exampleAwsSecurityGroup.id}
provisionedPollerConfig:
maximumPollers: 100
minimumPollers: 10
pollerGroupName: group-123
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
function_name = exampleAwsLambdaFunction.arn
topics = ["orders"]
starting_position = "TRIM_HORIZON"
self_managed_event_source = {
endpoints = {
"KAFKA_BOOTSTRAP_SERVERS" = "kafka1.example.com:9092,kafka2.example.com:9092"
}
}
self_managed_kafka_event_source_config = {
consumer_group_id = "lambda-consumer-group"
}
source_access_configurations {
type = "VPC_SUBNET"
uri ="subnet:${example1.id}"
}
source_access_configurations {
type = "VPC_SUBNET"
uri ="subnet:${example2.id}"
}
source_access_configurations {
type = "VPC_SECURITY_GROUP"
uri ="security_group:${exampleAwsSecurityGroup.id}"
}
provisioned_poller_config = {
maximum_pollers = 100
minimum_pollers = 10
poller_group_name = "group-123"
}
}
Amazon MQ (ActiveMQ)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsMqBroker.arn,
functionName: exampleAwsLambdaFunction.arn,
queues: "orders",
batchSize: 10,
sourceAccessConfigurations: [{
type: "BASIC_AUTH",
uri: exampleAwsSecretsmanagerSecretVersion.arn,
}],
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_mq_broker["arn"],
function_name=example_aws_lambda_function["arn"],
queues="orders",
batch_size=10,
source_access_configurations=[{
"type": "BASIC_AUTH",
"uri": example_aws_secretsmanager_secret_version["arn"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
Queues: pulumi.String("orders"),
BatchSize: pulumi.Int(10),
SourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("BASIC_AUTH"),
Uri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.Arn),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsMqBroker.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
Queues = "orders",
BatchSize = 10,
SourceAccessConfigurations = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "BASIC_AUTH",
Uri = exampleAwsSecretsmanagerSecretVersion.Arn,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsMqBroker.arn())
.functionName(exampleAwsLambdaFunction.arn())
.queues("orders")
.batchSize(10)
.sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("BASIC_AUTH")
.uri(exampleAwsSecretsmanagerSecretVersion.arn())
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsMqBroker.arn}
functionName: ${exampleAwsLambdaFunction.arn}
queues: orders
batchSize: 10
sourceAccessConfigurations:
- type: BASIC_AUTH
uri: ${exampleAwsSecretsmanagerSecretVersion.arn}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsMqBroker.arn
function_name = exampleAwsLambdaFunction.arn
queues = "orders"
batch_size = 10
source_access_configurations {
type = "BASIC_AUTH"
uri = exampleAwsSecretsmanagerSecretVersion.arn
}
}
Amazon MQ (RabbitMQ)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsMqBroker.arn,
functionName: exampleAwsLambdaFunction.arn,
queues: "orders",
batchSize: 1,
sourceAccessConfigurations: [
{
type: "VIRTUAL_HOST",
uri: "/production",
},
{
type: "BASIC_AUTH",
uri: exampleAwsSecretsmanagerSecretVersion.arn,
},
],
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_mq_broker["arn"],
function_name=example_aws_lambda_function["arn"],
queues="orders",
batch_size=1,
source_access_configurations=[
{
"type": "VIRTUAL_HOST",
"uri": "/production",
},
{
"type": "BASIC_AUTH",
"uri": example_aws_secretsmanager_secret_version["arn"],
},
])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
Queues: pulumi.String("orders"),
BatchSize: pulumi.Int(1),
SourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("VIRTUAL_HOST"),
Uri: pulumi.String("/production"),
},
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("BASIC_AUTH"),
Uri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.Arn),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsMqBroker.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
Queues = "orders",
BatchSize = 1,
SourceAccessConfigurations = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "VIRTUAL_HOST",
Uri = "/production",
},
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "BASIC_AUTH",
Uri = exampleAwsSecretsmanagerSecretVersion.Arn,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsMqBroker.arn())
.functionName(exampleAwsLambdaFunction.arn())
.queues("orders")
.batchSize(1)
.sourceAccessConfigurations(
EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("VIRTUAL_HOST")
.uri("/production")
.build(),
EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("BASIC_AUTH")
.uri(exampleAwsSecretsmanagerSecretVersion.arn())
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsMqBroker.arn}
functionName: ${exampleAwsLambdaFunction.arn}
queues: orders
batchSize: 1
sourceAccessConfigurations:
- type: VIRTUAL_HOST
uri: /production
- type: BASIC_AUTH
uri: ${exampleAwsSecretsmanagerSecretVersion.arn}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsMqBroker.arn
function_name = exampleAwsLambdaFunction.arn
queues = "orders"
batch_size = 1
source_access_configurations {
type = "VIRTUAL_HOST"
uri = "/production"
}
source_access_configurations {
type = "BASIC_AUTH"
uri = exampleAwsSecretsmanagerSecretVersion.arn
}
}
DocumentDB Change Stream
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.EventSourceMapping("example", {
eventSourceArn: exampleAwsDocdbCluster.arn,
functionName: exampleAwsLambdaFunction.arn,
startingPosition: "LATEST",
documentDbEventSourceConfig: {
databaseName: "orders",
collectionName: "transactions",
fullDocument: "UpdateLookup",
},
sourceAccessConfigurations: [{
type: "BASIC_AUTH",
uri: exampleAwsSecretsmanagerSecretVersion.arn,
}],
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.EventSourceMapping("example",
event_source_arn=example_aws_docdb_cluster["arn"],
function_name=example_aws_lambda_function["arn"],
starting_position="LATEST",
document_db_event_source_config={
"database_name": "orders",
"collection_name": "transactions",
"full_document": "UpdateLookup",
},
source_access_configurations=[{
"type": "BASIC_AUTH",
"uri": example_aws_secretsmanager_secret_version["arn"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
EventSourceArn: pulumi.Any(exampleAwsDocdbCluster.Arn),
FunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),
StartingPosition: pulumi.String("LATEST"),
DocumentDbEventSourceConfig: &lambda.EventSourceMappingDocumentDbEventSourceConfigArgs{
DatabaseName: pulumi.String("orders"),
CollectionName: pulumi.String("transactions"),
FullDocument: pulumi.String("UpdateLookup"),
},
SourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("BASIC_AUTH"),
Uri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.Arn),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lambda.EventSourceMapping("example", new()
{
EventSourceArn = exampleAwsDocdbCluster.Arn,
FunctionName = exampleAwsLambdaFunction.Arn,
StartingPosition = "LATEST",
DocumentDbEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingDocumentDbEventSourceConfigArgs
{
DatabaseName = "orders",
CollectionName = "transactions",
FullDocument = "UpdateLookup",
},
SourceAccessConfigurations = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "BASIC_AUTH",
Uri = exampleAwsSecretsmanagerSecretVersion.Arn,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.EventSourceMapping;
import com.pulumi.aws.lambda.EventSourceMappingArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingDocumentDbEventSourceConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new EventSourceMapping("example", EventSourceMappingArgs.builder()
.eventSourceArn(exampleAwsDocdbCluster.arn())
.functionName(exampleAwsLambdaFunction.arn())
.startingPosition("LATEST")
.documentDbEventSourceConfig(EventSourceMappingDocumentDbEventSourceConfigArgs.builder()
.databaseName("orders")
.collectionName("transactions")
.fullDocument("UpdateLookup")
.build())
.sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("BASIC_AUTH")
.uri(exampleAwsSecretsmanagerSecretVersion.arn())
.build())
.build());
}
}
resources:
example:
type: aws:lambda:EventSourceMapping
properties:
eventSourceArn: ${exampleAwsDocdbCluster.arn}
functionName: ${exampleAwsLambdaFunction.arn}
startingPosition: LATEST
documentDbEventSourceConfig:
databaseName: orders
collectionName: transactions
fullDocument: UpdateLookup
sourceAccessConfigurations:
- type: BASIC_AUTH
uri: ${exampleAwsSecretsmanagerSecretVersion.arn}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lambda_eventsourcemapping" "example" {
event_source_arn = exampleAwsDocdbCluster.arn
function_name = exampleAwsLambdaFunction.arn
starting_position = "LATEST"
document_db_event_source_config = {
database_name = "orders"
collection_name = "transactions"
full_document = "UpdateLookup"
}
source_access_configurations {
type = "BASIC_AUTH"
uri = exampleAwsSecretsmanagerSecretVersion.arn
}
}
Create EventSourceMapping Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def EventSourceMapping(resource_name: str,
args: EventSourceMappingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EventSourceMapping(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
metrics_config: Optional[EventSourceMappingMetricsConfigArgs] = None,
starting_position_timestamp: Optional[str] = None,
destination_config: Optional[EventSourceMappingDestinationConfigArgs] = None,
document_db_event_source_config: Optional[EventSourceMappingDocumentDbEventSourceConfigArgs] = None,
parallelization_factor: Optional[int] = None,
event_source_arn: Optional[str] = None,
filter_criteria: Optional[EventSourceMappingFilterCriteriaArgs] = None,
batch_size: Optional[int] = None,
function_response_types: Optional[Sequence[str]] = None,
kms_key_arn: Optional[str] = None,
maximum_batching_window_in_seconds: Optional[int] = None,
maximum_record_age_in_seconds: Optional[int] = None,
bisect_batch_on_function_error: Optional[bool] = None,
maximum_retry_attempts: Optional[int] = None,
enabled: Optional[bool] = None,
provisioned_poller_config: Optional[EventSourceMappingProvisionedPollerConfigArgs] = None,
queues: Optional[str] = None,
region: Optional[str] = None,
scaling_config: Optional[EventSourceMappingScalingConfigArgs] = None,
self_managed_event_source: Optional[EventSourceMappingSelfManagedEventSourceArgs] = None,
self_managed_kafka_event_source_config: Optional[EventSourceMappingSelfManagedKafkaEventSourceConfigArgs] = None,
source_access_configurations: Optional[Sequence[EventSourceMappingSourceAccessConfigurationArgs]] = None,
starting_position: Optional[str] = None,
amazon_managed_kafka_event_source_config: Optional[EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs] = None,
tags: Optional[Mapping[str, str]] = None,
topics: Optional[Sequence[str]] = None,
tumbling_window_in_seconds: Optional[int] = None,
use_resource_timeout_for_propagation: Optional[bool] = None)
public EventSourceMapping(String name, EventSourceMappingArgs args)
public EventSourceMapping(String name, EventSourceMappingArgs args, CustomResourceOptions options)
type: aws:lambda:EventSourceMapping
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_lambda_event_source_mapping" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args EventSourceMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EventSourceMappingArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EventSourceMappingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventSourceMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EventSourceMappingArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var eventSourceMappingResource = new Aws.Lambda.EventSourceMapping("eventSourceMappingResource", new()
{
FunctionName = "string",
MetricsConfig = new Aws.Lambda.Inputs.EventSourceMappingMetricsConfigArgs
{
Metrics = new[]
{
"string",
},
},
StartingPositionTimestamp = "string",
DestinationConfig = new Aws.Lambda.Inputs.EventSourceMappingDestinationConfigArgs
{
OnFailure = new Aws.Lambda.Inputs.EventSourceMappingDestinationConfigOnFailureArgs
{
DestinationArn = "string",
},
},
DocumentDbEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingDocumentDbEventSourceConfigArgs
{
DatabaseName = "string",
CollectionName = "string",
FullDocument = "string",
},
ParallelizationFactor = 0,
EventSourceArn = "string",
FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs
{
Filters = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs
{
Pattern = "string",
},
},
},
BatchSize = 0,
FunctionResponseTypes = new[]
{
"string",
},
KmsKeyArn = "string",
MaximumBatchingWindowInSeconds = 0,
MaximumRecordAgeInSeconds = 0,
BisectBatchOnFunctionError = false,
MaximumRetryAttempts = 0,
Enabled = false,
ProvisionedPollerConfig = new Aws.Lambda.Inputs.EventSourceMappingProvisionedPollerConfigArgs
{
MaximumPollers = 0,
MinimumPollers = 0,
PollerGroupName = "string",
},
Queues = "string",
Region = "string",
ScalingConfig = new Aws.Lambda.Inputs.EventSourceMappingScalingConfigArgs
{
MaximumConcurrency = 0,
},
SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs
{
Endpoints =
{
{ "string", "string" },
},
},
SelfManagedKafkaEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs
{
ConsumerGroupId = "string",
SchemaRegistryConfig = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigArgs
{
AccessConfigs = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs
{
Type = "string",
Uri = "string",
},
},
EventRecordFormat = "string",
SchemaRegistryUri = "string",
SchemaValidationConfigs = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs
{
Attribute = "string",
},
},
},
},
SourceAccessConfigurations = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs
{
Type = "string",
Uri = "string",
},
},
StartingPosition = "string",
AmazonManagedKafkaEventSourceConfig = new Aws.Lambda.Inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs
{
ConsumerGroupId = "string",
SchemaRegistryConfig = new Aws.Lambda.Inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigArgs
{
AccessConfigs = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs
{
Type = "string",
Uri = "string",
},
},
EventRecordFormat = "string",
SchemaRegistryUri = "string",
SchemaValidationConfigs = new[]
{
new Aws.Lambda.Inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs
{
Attribute = "string",
},
},
},
},
Tags =
{
{ "string", "string" },
},
Topics = new[]
{
"string",
},
TumblingWindowInSeconds = 0,
UseResourceTimeoutForPropagation = false,
});
example, err := lambda.NewEventSourceMapping(ctx, "eventSourceMappingResource", &lambda.EventSourceMappingArgs{
FunctionName: pulumi.String("string"),
MetricsConfig: &lambda.EventSourceMappingMetricsConfigArgs{
Metrics: pulumi.StringArray{
pulumi.String("string"),
},
},
StartingPositionTimestamp: pulumi.String("string"),
DestinationConfig: &lambda.EventSourceMappingDestinationConfigArgs{
OnFailure: &lambda.EventSourceMappingDestinationConfigOnFailureArgs{
DestinationArn: pulumi.String("string"),
},
},
DocumentDbEventSourceConfig: &lambda.EventSourceMappingDocumentDbEventSourceConfigArgs{
DatabaseName: pulumi.String("string"),
CollectionName: pulumi.String("string"),
FullDocument: pulumi.String("string"),
},
ParallelizationFactor: pulumi.Int(0),
EventSourceArn: pulumi.String("string"),
FilterCriteria: &lambda.EventSourceMappingFilterCriteriaArgs{
Filters: lambda.EventSourceMappingFilterCriteriaFilterArray{
&lambda.EventSourceMappingFilterCriteriaFilterArgs{
Pattern: pulumi.String("string"),
},
},
},
BatchSize: pulumi.Int(0),
FunctionResponseTypes: pulumi.StringArray{
pulumi.String("string"),
},
KmsKeyArn: pulumi.String("string"),
MaximumBatchingWindowInSeconds: pulumi.Int(0),
MaximumRecordAgeInSeconds: pulumi.Int(0),
BisectBatchOnFunctionError: pulumi.Bool(false),
MaximumRetryAttempts: pulumi.Int(0),
Enabled: pulumi.Bool(false),
ProvisionedPollerConfig: &lambda.EventSourceMappingProvisionedPollerConfigArgs{
MaximumPollers: pulumi.Int(0),
MinimumPollers: pulumi.Int(0),
PollerGroupName: pulumi.String("string"),
},
Queues: pulumi.String("string"),
Region: pulumi.String("string"),
ScalingConfig: &lambda.EventSourceMappingScalingConfigArgs{
MaximumConcurrency: pulumi.Int(0),
},
SelfManagedEventSource: &lambda.EventSourceMappingSelfManagedEventSourceArgs{
Endpoints: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
SelfManagedKafkaEventSourceConfig: &lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs{
ConsumerGroupId: pulumi.String("string"),
SchemaRegistryConfig: &lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigArgs{
AccessConfigs: lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArray{
&lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs{
Type: pulumi.String("string"),
Uri: pulumi.String("string"),
},
},
EventRecordFormat: pulumi.String("string"),
SchemaRegistryUri: pulumi.String("string"),
SchemaValidationConfigs: lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArray{
&lambda.EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs{
Attribute: pulumi.String("string"),
},
},
},
},
SourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{
&lambda.EventSourceMappingSourceAccessConfigurationArgs{
Type: pulumi.String("string"),
Uri: pulumi.String("string"),
},
},
StartingPosition: pulumi.String("string"),
AmazonManagedKafkaEventSourceConfig: &lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs{
ConsumerGroupId: pulumi.String("string"),
SchemaRegistryConfig: &lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigArgs{
AccessConfigs: lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArray{
&lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs{
Type: pulumi.String("string"),
Uri: pulumi.String("string"),
},
},
EventRecordFormat: pulumi.String("string"),
SchemaRegistryUri: pulumi.String("string"),
SchemaValidationConfigs: lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArray{
&lambda.EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs{
Attribute: pulumi.String("string"),
},
},
},
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Topics: pulumi.StringArray{
pulumi.String("string"),
},
TumblingWindowInSeconds: pulumi.Int(0),
UseResourceTimeoutForPropagation: pulumi.Bool(false),
})
resource "aws_lambda_event_source_mapping" "eventSourceMappingResource" {
lifecycle {
create_before_destroy = true
}
function_name = "string"
metrics_config = {
metrics = ["string"]
}
starting_position_timestamp = "string"
destination_config = {
on_failure = {
destination_arn = "string"
}
}
document_db_event_source_config = {
database_name = "string"
collection_name = "string"
full_document = "string"
}
parallelization_factor = 0
event_source_arn = "string"
filter_criteria = {
filters = [{
pattern = "string"
}]
}
batch_size = 0
function_response_types = ["string"]
kms_key_arn = "string"
maximum_batching_window_in_seconds = 0
maximum_record_age_in_seconds = 0
bisect_batch_on_function_error = false
maximum_retry_attempts = 0
enabled = false
provisioned_poller_config = {
maximum_pollers = 0
minimum_pollers = 0
poller_group_name = "string"
}
queues = "string"
region = "string"
scaling_config = {
maximum_concurrency = 0
}
self_managed_event_source = {
endpoints = {
"string" = "string"
}
}
self_managed_kafka_event_source_config = {
consumer_group_id = "string"
schema_registry_config = {
access_configs = [{
type = "string"
uri = "string"
}]
event_record_format = "string"
schema_registry_uri = "string"
schema_validation_configs = [{
attribute = "string"
}]
}
}
source_access_configurations {
type = "string"
uri = "string"
}
starting_position = "string"
amazon_managed_kafka_event_source_config = {
consumer_group_id = "string"
schema_registry_config = {
access_configs = [{
type = "string"
uri = "string"
}]
event_record_format = "string"
schema_registry_uri = "string"
schema_validation_configs = [{
attribute = "string"
}]
}
}
tags = {
"string" = "string"
}
topics = ["string"]
tumbling_window_in_seconds = 0
use_resource_timeout_for_propagation = false
}
var eventSourceMappingResource = new EventSourceMapping("eventSourceMappingResource", EventSourceMappingArgs.builder()
.functionName("string")
.metricsConfig(EventSourceMappingMetricsConfigArgs.builder()
.metrics("string")
.build())
.startingPositionTimestamp("string")
.destinationConfig(EventSourceMappingDestinationConfigArgs.builder()
.onFailure(EventSourceMappingDestinationConfigOnFailureArgs.builder()
.destinationArn("string")
.build())
.build())
.documentDbEventSourceConfig(EventSourceMappingDocumentDbEventSourceConfigArgs.builder()
.databaseName("string")
.collectionName("string")
.fullDocument("string")
.build())
.parallelizationFactor(0)
.eventSourceArn("string")
.filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()
.filters(EventSourceMappingFilterCriteriaFilterArgs.builder()
.pattern("string")
.build())
.build())
.batchSize(0)
.functionResponseTypes("string")
.kmsKeyArn("string")
.maximumBatchingWindowInSeconds(0)
.maximumRecordAgeInSeconds(0)
.bisectBatchOnFunctionError(false)
.maximumRetryAttempts(0)
.enabled(false)
.provisionedPollerConfig(EventSourceMappingProvisionedPollerConfigArgs.builder()
.maximumPollers(0)
.minimumPollers(0)
.pollerGroupName("string")
.build())
.queues("string")
.region("string")
.scalingConfig(EventSourceMappingScalingConfigArgs.builder()
.maximumConcurrency(0)
.build())
.selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()
.endpoints(Map.of("string", "string"))
.build())
.selfManagedKafkaEventSourceConfig(EventSourceMappingSelfManagedKafkaEventSourceConfigArgs.builder()
.consumerGroupId("string")
.schemaRegistryConfig(EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigArgs.builder()
.accessConfigs(EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs.builder()
.type("string")
.uri("string")
.build())
.eventRecordFormat("string")
.schemaRegistryUri("string")
.schemaValidationConfigs(EventSourceMappingSelfManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs.builder()
.attribute("string")
.build())
.build())
.build())
.sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()
.type("string")
.uri("string")
.build())
.startingPosition("string")
.amazonManagedKafkaEventSourceConfig(EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs.builder()
.consumerGroupId("string")
.schemaRegistryConfig(EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigArgs.builder()
.accessConfigs(EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigAccessConfigArgs.builder()
.type("string")
.uri("string")
.build())
.eventRecordFormat("string")
.schemaRegistryUri("string")
.schemaValidationConfigs(EventSourceMappingAmazonManagedKafkaEventSourceConfigSchemaRegistryConfigSchemaValidationConfigArgs.builder()
.attribute("string")
.build())
.build())
.build())
.tags(Map.of("string", "string"))
.topics("string")
.tumblingWindowInSeconds(0)
.useResourceTimeoutForPropagation(false)
.build());
event_source_mapping_resource = aws.lambda_.EventSourceMapping("eventSourceMappingResource",
function_name="string",
metrics_config={
"metrics": ["string"],
},
starting_position_timestamp="string",
destination_config={
"on_failure": {
"destination_arn": "string",
},
},
document_db_event_source_config={
"database_name": "string",
"collection_name": "string",
"full_document": "string",
},
parallelization_factor=0,
event_source_arn="string",
filter_criteria={
"filters": [{
"pattern": "string",
}],
},
batch_size=0,
function_response_types=["string"],
kms_key_arn="string",
maximum_batching_window_in_seconds=0,
maximum_record_age_in_seconds=0,
bisect_batch_on_function_error=False,
maximum_retry_attempts=0,
enabled=False,
provisioned_poller_config={
"maximum_pollers": 0,
"minimum_pollers": 0,
"poller_group_name": "string",
},
queues="string",
region="string",
scaling_config={
"maximum_concurrency": 0,
},
self_managed_event_source={
"endpoints": {
"string": "string",
},
},
self_managed_kafka_event_source_config={
"consumer_group_id": "string",
"schema_registry_config": {
"access_configs": [{
"type": "string",
"uri": "string",
}],
"event_record_format": "string",
"schema_registry_uri": "string",
"schema_validation_configs": [{
"attribute": "string",
}],
},
},
source_access_configurations=[{
"type": "string",
"uri": "string",
}],
starting_position="string",
amazon_managed_kafka_event_source_config={
"consumer_group_id": "string",
"schema_registry_config": {
"access_configs": [{
"type": "string",
"uri": "string",
}],
"event_record_format": "string",
"schema_registry_uri": "string",
"schema_validation_configs": [{
"attribute": "string",
}],
},
},
tags={
"string": "string",
},
topics=["string"],
tumbling_window_in_seconds=0,
use_resource_timeout_for_propagation=False)
const eventSourceMappingResource = new aws.lambda.EventSourceMapping("eventSourceMappingResource", {
functionName: "string",
metricsConfig: {
metrics: ["string"],
},
startingPositionTimestamp: "string",
destinationConfig: {
onFailure: {
destinationArn: "string",
},
},
documentDbEventSourceConfig: {
databaseName: "string",
collectionName: "string",
fullDocument: "string",
},
parallelizationFactor: 0,
eventSourceArn: "string",
filterCriteria: {
filters: [{
pattern: "string",
}],
},
batchSize: 0,
functionResponseTypes: ["string"],
kmsKeyArn: "string",
maximumBatchingWindowInSeconds: 0,
maximumRecordAgeInSeconds: 0,
bisectBatchOnFunctionError: false,
maximumRetryAttempts: 0,
enabled: false,
provisionedPollerConfig: {
maximumPollers: 0,
minimumPollers: 0,
pollerGroupName: "string",
},
queues: "string",
region: "string",
scalingConfig: {
maximumConcurrency: 0,
},
selfManagedEventSource: {
endpoints: {
string: "string",
},
},
selfManagedKafkaEventSourceConfig: {
consumerGroupId: "string",
schemaRegistryConfig: {
accessConfigs: [{
type: "string",
uri: "string",
}],
eventRecordFormat: "string",
schemaRegistryUri: "string",
schemaValidationConfigs: [{
attribute: "string",
}],
},
},
sourceAccessConfigurations: [{
type: "string",
uri: "string",
}],
startingPosition: "string",
amazonManagedKafkaEventSourceConfig: {
consumerGroupId: "string",
schemaRegistryConfig: {
accessConfigs: [{
type: "string",
uri: "string",
}],
eventRecordFormat: "string",
schemaRegistryUri: "string",
schemaValidationConfigs: [{
attribute: "string",
}],
},
},
tags: {
string: "string",
},
topics: ["string"],
tumblingWindowInSeconds: 0,
useResourceTimeoutForPropagation: false,
});
type: aws:lambda:EventSourceMapping
properties:
amazonManagedKafkaEventSourceConfig:
consumerGroupId: string
schemaRegistryConfig:
accessConfigs:
- type: string
uri: string
eventRecordFormat: string
schemaRegistryUri: string
schemaValidationConfigs:
- attribute: string
batchSize: 0
bisectBatchOnFunctionError: false
destinationConfig:
onFailure:
destinationArn: string
documentDbEventSourceConfig:
collectionName: string
databaseName: string
fullDocument: string
enabled: false
eventSourceArn: string
filterCriteria:
filters:
- pattern: string
functionName: string
functionResponseTypes:
- string
kmsKeyArn: string
maximumBatchingWindowInSeconds: 0
maximumRecordAgeInSeconds: 0
maximumRetryAttempts: 0
metricsConfig:
metrics:
- string
parallelizationFactor: 0
provisionedPollerConfig:
maximumPollers: 0
minimumPollers: 0
pollerGroupName: string
queues: string
region: string
scalingConfig:
maximumConcurrency: 0
selfManagedEventSource:
endpoints:
string: string
selfManagedKafkaEventSourceConfig:
consumerGroupId: string
schemaRegistryConfig:
accessConfigs:
- type: string
uri: string
eventRecordFormat: string
schemaRegistryUri: string
schemaValidationConfigs:
- attribute: string
sourceAccessConfigurations:
- type: string
uri: string
startingPosition: string
startingPositionTimestamp: string
tags:
string: string
topics:
- string
tumblingWindowInSeconds: 0
useResourceTimeoutForPropagation: false
EventSourceMapping Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The EventSourceMapping resource accepts the following input properties:
- Function Name string
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- Amazon Managed Kafka Event Source Config Event Source Mapping Amazon Managed Kafka Event Source Config
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - Batch Size int
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - Bisect Batch On Function Error bool
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - Destination Config Event Source Mapping Destination Config
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- Document Db Event Source Config Event Source Mapping Document Db Event Source Config
- Configuration settings for a DocumentDB event source. See below.
- Enabled bool
- Whether the mapping is enabled. Defaults to
true. - Event Source Arn string
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- Filter Criteria Event Source Mapping Filter Criteria
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- Function Response Types List<string>
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - Kms Key Arn string
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- Maximum Batching Window In Seconds int
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - Maximum Record Age In Seconds int
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- Maximum Retry Attempts int
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- Metrics Config Event Source Mapping Metrics Config
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- Parallelization Factor int
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- Provisioned Poller Config Event Source Mapping Provisioned Poller Config
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- Queues string
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Scaling Config Event Source Mapping Scaling Config
- Scaling configuration of the event source. Only available for SQS queues. See below.
- Self Managed Event Source Event Source Mapping Self Managed Event Source
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - Self Managed Kafka Event Source Config Event Source Mapping Self Managed Kafka Event Source Config
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - Source Access Configurations List<Event Source Mapping Source Access Configuration>
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - Starting Position string
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - Starting Position Timestamp string
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - Tags Dictionary<string, string>
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Topics List<string>
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- Tumbling Window In Seconds int
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- Use Resource Timeout For Propagation bool
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- Function Name string
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- Amazon Managed Kafka Event Source Config Event Source Mapping Amazon Managed Kafka Event Source Config Args
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - Batch Size int
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - Bisect Batch On Function Error bool
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - Destination Config Event Source Mapping Destination Config Args
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- Document Db Event Source Config Event Source Mapping Document Db Event Source Config Args
- Configuration settings for a DocumentDB event source. See below.
- Enabled bool
- Whether the mapping is enabled. Defaults to
true. - Event Source Arn string
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- Filter Criteria Event Source Mapping Filter Criteria Args
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- Function Response Types []string
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - Kms Key Arn string
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- Maximum Batching Window In Seconds int
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - Maximum Record Age In Seconds int
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- Maximum Retry Attempts int
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- Metrics Config Event Source Mapping Metrics Config Args
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- Parallelization Factor int
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- Provisioned Poller Config Event Source Mapping Provisioned Poller Config Args
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- Queues string
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Scaling Config Event Source Mapping Scaling Config Args
- Scaling configuration of the event source. Only available for SQS queues. See below.
- Self Managed Event Source Event Source Mapping Self Managed Event Source Args
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - Self Managed Kafka Event Source Config Event Source Mapping Self Managed Kafka Event Source Config Args
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - Source Access Configurations []Event Source Mapping Source Access Configuration Args
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - Starting Position string
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - Starting Position Timestamp string
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - Tags map[string]string
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Topics []string
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- Tumbling Window In Seconds int
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- Use Resource Timeout For Propagation bool
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- function_ name string
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- amazon_ managed_ kafka_ event_ source_ config object
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - batch_ size number
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - bisect_ batch_ on_ function_ error bool
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - destination_ config object
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- document_ db_ event_ source_ config object
- Configuration settings for a DocumentDB event source. See below.
- enabled bool
- Whether the mapping is enabled. Defaults to
true. - event_ source_ arn string
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- filter_ criteria object
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- function_ response_ types list(string)
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - kms_ key_ arn string
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- maximum_ batching_ window_ in_ seconds number
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - maximum_ record_ age_ in_ seconds number
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- maximum_ retry_ attempts number
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- metrics_ config object
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- parallelization_ factor number
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- provisioned_ poller_ config object
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- queues string
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- scaling_ config object
- Scaling configuration of the event source. Only available for SQS queues. See below.
- self_ managed_ event_ source object
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - self_ managed_ kafka_ event_ source_ config object
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - source_ access_ configurations list(object)
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - starting_ position string
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - starting_ position_ timestamp string
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - tags map(string)
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - topics list(string)
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- tumbling_ window_ in_ seconds number
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- use_ resource_ timeout_ for_ propagation bool
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- function Name String
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- amazon Managed Kafka Event Source Config Event Source Mapping Amazon Managed Kafka Event Source Config
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - batch Size Integer
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - bisect Batch On Function Error Boolean
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - destination Config Event Source Mapping Destination Config
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- document Db Event Source Config Event Source Mapping Document Db Event Source Config
- Configuration settings for a DocumentDB event source. See below.
- enabled Boolean
- Whether the mapping is enabled. Defaults to
true. - event Source Arn String
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- filter Criteria Event Source Mapping Filter Criteria
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- function Response Types List<String>
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - kms Key Arn String
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- maximum Batching Window In Seconds Integer
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - maximum Record Age In Seconds Integer
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- maximum Retry Attempts Integer
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- metrics Config Event Source Mapping Metrics Config
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- parallelization Factor Integer
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- provisioned Poller Config Event Source Mapping Provisioned Poller Config
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- queues String
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- scaling Config Event Source Mapping Scaling Config
- Scaling configuration of the event source. Only available for SQS queues. See below.
- self Managed Event Source Event Source Mapping Self Managed Event Source
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - self Managed Kafka Event Source Config Event Source Mapping Self Managed Kafka Event Source Config
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - source Access Configurations List<Event Source Mapping Source Access Configuration>
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - starting Position String
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - starting Position Timestamp String
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - tags Map<String,String>
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - topics List<String>
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- tumbling Window In Seconds Integer
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- use Resource Timeout For Propagation Boolean
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- function Name string
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- amazon Managed Kafka Event Source Config Event Source Mapping Amazon Managed Kafka Event Source Config
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - batch Size number
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - bisect Batch On Function Error boolean
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - destination Config Event Source Mapping Destination Config
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- document Db Event Source Config Event Source Mapping Document Db Event Source Config
- Configuration settings for a DocumentDB event source. See below.
- enabled boolean
- Whether the mapping is enabled. Defaults to
true. - event Source Arn string
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- filter Criteria Event Source Mapping Filter Criteria
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- function Response Types string[]
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - kms Key Arn string
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- maximum Batching Window In Seconds number
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - maximum Record Age In Seconds number
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- maximum Retry Attempts number
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- metrics Config Event Source Mapping Metrics Config
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- parallelization Factor number
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- provisioned Poller Config Event Source Mapping Provisioned Poller Config
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- queues string
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- scaling Config Event Source Mapping Scaling Config
- Scaling configuration of the event source. Only available for SQS queues. See below.
- self Managed Event Source Event Source Mapping Self Managed Event Source
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - self Managed Kafka Event Source Config Event Source Mapping Self Managed Kafka Event Source Config
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - source Access Configurations Event Source Mapping Source Access Configuration[]
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - starting Position string
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - starting Position Timestamp string
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - tags {[key: string]: string}
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - topics string[]
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- tumbling Window In Seconds number
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- use Resource Timeout For Propagation boolean
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- function_ name str
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- amazon_ managed_ kafka_ event_ source_ config Event Source Mapping Amazon Managed Kafka Event Source Config Args
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - batch_ size int
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - bisect_ batch_ on_ function_ error bool
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - destination_ config Event Source Mapping Destination Config Args
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- document_ db_ event_ source_ config Event Source Mapping Document Db Event Source Config Args
- Configuration settings for a DocumentDB event source. See below.
- enabled bool
- Whether the mapping is enabled. Defaults to
true. - event_ source_ arn str
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- filter_ criteria Event Source Mapping Filter Criteria Args
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- function_ response_ types Sequence[str]
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - kms_ key_ arn str
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- maximum_ batching_ window_ in_ seconds int
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - maximum_ record_ age_ in_ seconds int
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- maximum_ retry_ attempts int
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- metrics_ config Event Source Mapping Metrics Config Args
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- parallelization_ factor int
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- provisioned_ poller_ config Event Source Mapping Provisioned Poller Config Args
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- queues str
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- scaling_ config Event Source Mapping Scaling Config Args
- Scaling configuration of the event source. Only available for SQS queues. See below.
- self_ managed_ event_ source Event Source Mapping Self Managed Event Source Args
- For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include
sourceAccessConfiguration. See below. - self_ managed_ kafka_ event_ source_ config Event Source Mapping Self Managed Kafka Event Source Config Args
- Additional configuration block for Self Managed Kafka sources. Incompatible with
eventSourceArnandamazonManagedKafkaEventSourceConfig. See below. - source_ access_ configurations Sequence[Event Source Mapping Source Access Configuration Args]
- For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include
selfManagedEventSource. See below. - starting_ position str
- Position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference. - starting_ position_ timestamp str
- Timestamp in RFC3339 format of the data record which to start reading when using
startingPositionset toAT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen. - tags Mapping[str, str]
- Map of tags to assign to the object. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - topics Sequence[str]
- Name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
- tumbling_ window_ in_ seconds int
- Duration in seconds of a processing window for AWS Lambda streaming analytics. The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
- use_ resource_ timeout_ for_ propagation bool
- Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to
true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
- function Name String
Name or ARN of the Lambda function that will be subscribing to events.
The following arguments are optional:
- amazon Managed Kafka Event Source Config Property Map
- Additional configuration block for Amazon Managed Kafka sources. Incompatible with
selfManagedEventSourceandselfManagedKafkaEventSourceConfig. See below. - batch Size Number
- Largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB, Kinesis, MQ and MSK,10for SQS. - bisect Batch On Function Error Boolean
- Whether to split the batch in two and retry if the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Defaults to
false. - destination Config Property Map
- Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). See below.
- document Db Event Source Config Property Map
- Configuration settings for a DocumentDB event source. See below.
- enabled Boolean
- Whether the mapping is enabled. Defaults to
true. - event Source Arn String
- Event source ARN - required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream. Incompatible with Self Managed Kafka source.
- filter Criteria Property Map
- Criteria to use for event filtering Kinesis stream, DynamoDB stream, SQS queue event sources. See below.
- function Response Types List<String>
- List of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values:
ReportBatchItemFailures. - kms Key Arn String
- ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
- maximum Batching Window In Seconds Number
- Maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer until either
maximumBatchingWindowInSecondsexpires orbatchSizehas been met. For streaming event sources, defaults to as soon as records are available in the stream. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues. - maximum Record Age In Seconds Number
- Maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
- maximum Retry Attempts Number
- Maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
- metrics Config Property Map
- CloudWatch metrics configuration of the event source. Only available for stream sources (DynamoDB and Kinesis) and SQS queues. See below.
- parallelization Factor Number
- Number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
- provisioned Poller Config Property Map
- Event poller configuration for the event source. Only valid for Amazon MSK or self-managed Apache Kafka sources. See below.
- queues String
- Name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list mus