EventSourceMapping

Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS.

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Lambda.EventSourceMapping("example", new Aws.Lambda.EventSourceMappingArgs
        {
            EventSourceArn = aws_dynamodb_table.Example.Stream_arn,
            FunctionName = aws_lambda_function.Example.Arn,
            StartingPosition = "LATEST",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lambda"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
            EventSourceArn:   pulumi.String(aws_dynamodb_table.Example.Stream_arn),
            FunctionName:     pulumi.String(aws_lambda_function.Example.Arn),
            StartingPosition: pulumi.String("LATEST"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.lambda_.EventSourceMapping("example",
    event_source_arn=aws_dynamodb_table["example"]["stream_arn"],
    function_name=aws_lambda_function["example"]["arn"],
    starting_position="LATEST")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.lambda.EventSourceMapping("example", {
    eventSourceArn: aws_dynamodb_table_example.streamArn,
    functionName: aws_lambda_function_example.arn,
    startingPosition: "LATEST",
});

Kinesis

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Lambda.EventSourceMapping("example", new Aws.Lambda.EventSourceMappingArgs
        {
            EventSourceArn = aws_kinesis_stream.Example.Arn,
            FunctionName = aws_lambda_function.Example.Arn,
            StartingPosition = "LATEST",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lambda"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
            EventSourceArn:   pulumi.String(aws_kinesis_stream.Example.Arn),
            FunctionName:     pulumi.String(aws_lambda_function.Example.Arn),
            StartingPosition: pulumi.String("LATEST"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.lambda_.EventSourceMapping("example",
    event_source_arn=aws_kinesis_stream["example"]["arn"],
    function_name=aws_lambda_function["example"]["arn"],
    starting_position="LATEST")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.lambda.EventSourceMapping("example", {
    eventSourceArn: aws_kinesis_stream_example.arn,
    functionName: aws_lambda_function_example.arn,
    startingPosition: "LATEST",
});

SQS

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Lambda.EventSourceMapping("example", new Aws.Lambda.EventSourceMappingArgs
        {
            EventSourceArn = aws_sqs_queue.Sqs_queue_test.Arn,
            FunctionName = aws_lambda_function.Example.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lambda"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lambda.NewEventSourceMapping(ctx, "example", &lambda.EventSourceMappingArgs{
            EventSourceArn: pulumi.String(aws_sqs_queue.Sqs_queue_test.Arn),
            FunctionName:   pulumi.String(aws_lambda_function.Example.Arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.lambda_.EventSourceMapping("example",
    event_source_arn=aws_sqs_queue["sqs_queue_test"]["arn"],
    function_name=aws_lambda_function["example"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.lambda.EventSourceMapping("example", {
    eventSourceArn: aws_sqs_queue_sqs_queue_test.arn,
    functionName: aws_lambda_function_example.arn,
});

Create a EventSourceMapping Resource

def EventSourceMapping(resource_name, opts=None, batch_size=None, bisect_batch_on_function_error=None, destination_config=None, enabled=None, event_source_arn=None, function_name=None, maximum_batching_window_in_seconds=None, maximum_record_age_in_seconds=None, maximum_retry_attempts=None, parallelization_factor=None, starting_position=None, starting_position_timestamp=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

EventSourceMapping Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The EventSourceMapping resource accepts the following input properties:

EventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

FunctionName string

The name or the ARN of the Lambda function that will be subscribing to events.

BatchSize int

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

BisectBatchOnFunctionError bool
DestinationConfig EventSourceMappingDestinationConfigArgs
Enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

MaximumBatchingWindowInSeconds int

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
StartingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

StartingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

EventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

FunctionName string

The name or the ARN of the Lambda function that will be subscribing to events.

BatchSize int

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

BisectBatchOnFunctionError bool
DestinationConfig EventSourceMappingDestinationConfig
Enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

MaximumBatchingWindowInSeconds int

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
StartingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

StartingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

eventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

functionName string

The name or the ARN of the Lambda function that will be subscribing to events.

batchSize number

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

bisectBatchOnFunctionError boolean
destinationConfig EventSourceMappingDestinationConfig
enabled boolean

Determines if the mapping will be enabled on creation. Defaults to true.

maximumBatchingWindowInSeconds number

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

maximumRecordAgeInSeconds number
maximumRetryAttempts number
parallelizationFactor number
startingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

startingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

event_source_arn str

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

function_name str

The name or the ARN of the Lambda function that will be subscribing to events.

batch_size float

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

bisect_batch_on_function_error bool
destination_config Dict[EventSourceMappingDestinationConfig]
enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

maximum_batching_window_in_seconds float

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

maximum_record_age_in_seconds float
maximum_retry_attempts float
parallelization_factor float
starting_position str

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventSourceMapping resource produces the following output properties:

FunctionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

Id string
The provider-assigned unique ID for this managed resource.
LastModified string

The date this resource was last modified.

LastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

State string

The state of the event source mapping.

StateTransitionReason string

The reason the event source mapping is in its current state.

Uuid string

The UUID of the created event source mapping.

FunctionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

Id string
The provider-assigned unique ID for this managed resource.
LastModified string

The date this resource was last modified.

LastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

State string

The state of the event source mapping.

StateTransitionReason string

The reason the event source mapping is in its current state.

Uuid string

The UUID of the created event source mapping.

functionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

id string
The provider-assigned unique ID for this managed resource.
lastModified string

The date this resource was last modified.

lastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

state string

The state of the event source mapping.

stateTransitionReason string

The reason the event source mapping is in its current state.

uuid string

The UUID of the created event source mapping.

function_arn str

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

id str
The provider-assigned unique ID for this managed resource.
last_modified str

The date this resource was last modified.

last_processing_result str

The result of the last AWS Lambda invocation of your Lambda function.

state str

The state of the event source mapping.

state_transition_reason str

The reason the event source mapping is in its current state.

uuid str

The UUID of the created event source mapping.

Look up an Existing EventSourceMapping Resource

Get an existing EventSourceMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventSourceMappingState, opts?: CustomResourceOptions): EventSourceMapping
static get(resource_name, id, opts=None, batch_size=None, bisect_batch_on_function_error=None, destination_config=None, enabled=None, event_source_arn=None, function_arn=None, function_name=None, last_modified=None, last_processing_result=None, maximum_batching_window_in_seconds=None, maximum_record_age_in_seconds=None, maximum_retry_attempts=None, parallelization_factor=None, starting_position=None, starting_position_timestamp=None, state=None, state_transition_reason=None, uuid=None, __props__=None);
func GetEventSourceMapping(ctx *Context, name string, id IDInput, state *EventSourceMappingState, opts ...ResourceOption) (*EventSourceMapping, error)
public static EventSourceMapping Get(string name, Input<string> id, EventSourceMappingState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

BatchSize int

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

BisectBatchOnFunctionError bool
DestinationConfig EventSourceMappingDestinationConfigArgs
Enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

EventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

FunctionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

FunctionName string

The name or the ARN of the Lambda function that will be subscribing to events.

LastModified string

The date this resource was last modified.

LastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

MaximumBatchingWindowInSeconds int

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
StartingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

StartingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

State string

The state of the event source mapping.

StateTransitionReason string

The reason the event source mapping is in its current state.

Uuid string

The UUID of the created event source mapping.

BatchSize int

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

BisectBatchOnFunctionError bool
DestinationConfig EventSourceMappingDestinationConfig
Enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

EventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

FunctionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

FunctionName string

The name or the ARN of the Lambda function that will be subscribing to events.

LastModified string

The date this resource was last modified.

LastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

MaximumBatchingWindowInSeconds int

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

MaximumRecordAgeInSeconds int
MaximumRetryAttempts int
ParallelizationFactor int
StartingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

StartingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

State string

The state of the event source mapping.

StateTransitionReason string

The reason the event source mapping is in its current state.

Uuid string

The UUID of the created event source mapping.

batchSize number

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

bisectBatchOnFunctionError boolean
destinationConfig EventSourceMappingDestinationConfig
enabled boolean

Determines if the mapping will be enabled on creation. Defaults to true.

eventSourceArn string

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

functionArn string

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

functionName string

The name or the ARN of the Lambda function that will be subscribing to events.

lastModified string

The date this resource was last modified.

lastProcessingResult string

The result of the last AWS Lambda invocation of your Lambda function.

maximumBatchingWindowInSeconds number

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

maximumRecordAgeInSeconds number
maximumRetryAttempts number
parallelizationFactor number
startingPosition string

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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.

startingPositionTimestamp string

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

state string

The state of the event source mapping.

stateTransitionReason string

The reason the event source mapping is in its current state.

uuid string

The UUID of the created event source mapping.

batch_size float

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

bisect_batch_on_function_error bool
destination_config Dict[EventSourceMappingDestinationConfig]
enabled bool

Determines if the mapping will be enabled on creation. Defaults to true.

event_source_arn str

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

function_arn str

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

function_name str

The name or the ARN of the Lambda function that will be subscribing to events.

last_modified str

The date this resource was last modified.

last_processing_result str

The result of the last AWS Lambda invocation of your Lambda function.

maximum_batching_window_in_seconds float

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

maximum_record_age_in_seconds float
maximum_retry_attempts float
parallelization_factor float
starting_position str

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. 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

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_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. * parallelization_factor: - (Optional) The 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. * maximum_retry_attempts: - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum of 0, maximum and default of 10000. * maximum_record_age_in_seconds: - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Minimum of 60, maximum and default of 604800. * bisect_batch_on_function_error: - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to false. * destination_config: - (Optional) An Amazon SQS queue or Amazon SNS topic destination for failed records. Only available for stream sources (DynamoDB and Kinesis). Detailed below.

state str

The state of the event source mapping.

state_transition_reason str

The reason the event source mapping is in its current state.

uuid str

The UUID of the created event source mapping.

Supporting Types

EventSourceMappingDestinationConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

OnFailure EventSourceMappingDestinationConfigOnFailureArgs

The destination configuration for failed invocations. Detailed below.

OnFailure EventSourceMappingDestinationConfigOnFailure

The destination configuration for failed invocations. Detailed below.

onFailure EventSourceMappingDestinationConfigOnFailure

The destination configuration for failed invocations. Detailed below.

on_failure Dict[EventSourceMappingDestinationConfigOnFailure]

The destination configuration for failed invocations. Detailed below.

EventSourceMappingDestinationConfigOnFailure

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DestinationArn string

The Amazon Resource Name (ARN) of the destination resource.

DestinationArn string

The Amazon Resource Name (ARN) of the destination resource.

destinationArn string

The Amazon Resource Name (ARN) of the destination resource.

destination_arn str

The Amazon Resource Name (ARN) of the destination resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.