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
new EventSourceMapping(name: string, args: EventSourceMappingArgs, opts?: CustomResourceOptions);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);func NewEventSourceMapping(ctx *Context, name string, args EventSourceMappingArgs, opts ...ResourceOption) (*EventSourceMapping, error)public EventSourceMapping(string name, EventSourceMappingArgs args, CustomResourceOptions? opts = null)- 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:
- Event
Source stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- Function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- Batch
Size int The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- Bisect
Batch boolOn Function Error - Destination
Config EventSource Mapping Destination Config Args - Enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- Maximum
Batching intWindow In Seconds 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_secondsexpires orbatch_sizehas 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 intAge In Seconds - Maximum
Retry intAttempts - Parallelization
Factor int - Starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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 stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- Function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- Batch
Size int The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- Bisect
Batch boolOn Function Error - Destination
Config EventSource Mapping Destination Config - Enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- Maximum
Batching intWindow In Seconds 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_secondsexpires orbatch_sizehas 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 intAge In Seconds - Maximum
Retry intAttempts - Parallelization
Factor int - Starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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 stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- batch
Size number The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- bisect
Batch booleanOn Function Error - destination
Config EventSource Mapping Destination Config - enabled boolean
Determines if the mapping will be enabled on creation. Defaults to
true.- maximum
Batching numberWindow In Seconds 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_secondsexpires orbatch_sizehas 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 numberAge In Seconds - maximum
Retry numberAttempts - parallelization
Factor number - starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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_ strarn 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
100for DynamoDB and Kinesis,10for SQS.- bisect_
batch_ boolon_ function_ error - destination_
config Dict[EventSource Mapping Destination Config] - enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- maximum_
batching_ floatwindow_ in_ seconds 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_secondsexpires orbatch_sizehas 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_ floatage_ in_ seconds - maximum_
retry_ floatattempts - 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),LATESTorTRIM_HORIZONif 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_ strtimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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:
- Function
Arn 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_nameabove.)- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string The date this resource was last modified.
- Last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- State string
The state of the event source mapping.
- State
Transition stringReason The reason the event source mapping is in its current state.
- Uuid string
The UUID of the created event source mapping.
- Function
Arn 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_nameabove.)- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string The date this resource was last modified.
- Last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- State string
The state of the event source mapping.
- State
Transition stringReason The reason the event source mapping is in its current state.
- Uuid string
The UUID of the created event source mapping.
- function
Arn 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_nameabove.)- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string The date this resource was last modified.
- last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- state string
The state of the event source mapping.
- state
Transition stringReason 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_nameabove.)- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str The date this resource was last modified.
- last_
processing_ strresult The result of the last AWS Lambda invocation of your Lambda function.
- state str
The state of the event source mapping.
- state_
transition_ strreason 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): EventSourceMappingstatic 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:
- Batch
Size int The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- Bisect
Batch boolOn Function Error - Destination
Config EventSource Mapping Destination Config Args - Enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- Event
Source stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- Function
Arn 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_nameabove.)- Function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- Last
Modified string The date this resource was last modified.
- Last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- Maximum
Batching intWindow In Seconds 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_secondsexpires orbatch_sizehas 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 intAge In Seconds - Maximum
Retry intAttempts - Parallelization
Factor int - Starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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.
- State
Transition stringReason The reason the event source mapping is in its current state.
- Uuid string
The UUID of the created event source mapping.
- Batch
Size int The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- Bisect
Batch boolOn Function Error - Destination
Config EventSource Mapping Destination Config - Enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- Event
Source stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- Function
Arn 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_nameabove.)- Function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- Last
Modified string The date this resource was last modified.
- Last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- Maximum
Batching intWindow In Seconds 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_secondsexpires orbatch_sizehas 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 intAge In Seconds - Maximum
Retry intAttempts - Parallelization
Factor int - Starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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.
- State
Transition stringReason The reason the event source mapping is in its current state.
- Uuid string
The UUID of the created event source mapping.
- batch
Size number The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to
100for DynamoDB and Kinesis,10for SQS.- bisect
Batch booleanOn Function Error - destination
Config EventSource Mapping Destination Config - enabled boolean
Determines if the mapping will be enabled on creation. Defaults to
true.- event
Source stringArn The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.
- function
Arn 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_nameabove.)- function
Name string The name or the ARN of the Lambda function that will be subscribing to events.
- last
Modified string The date this resource was last modified.
- last
Processing stringResult The result of the last AWS Lambda invocation of your Lambda function.
- maximum
Batching numberWindow In Seconds 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_secondsexpires orbatch_sizehas 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 numberAge In Seconds - maximum
Retry numberAttempts - parallelization
Factor number - starting
Position string The position in the stream where AWS Lambda should start reading. Must be one of
AT_TIMESTAMP(Kinesis only),LATESTorTRIM_HORIZONif 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 stringTimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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.
- state
Transition stringReason 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
100for DynamoDB and Kinesis,10for SQS.- bisect_
batch_ boolon_ function_ error - destination_
config Dict[EventSource Mapping Destination Config] - enabled bool
Determines if the mapping will be enabled on creation. Defaults to
true.- event_
source_ strarn 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_nameabove.)- 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_ strresult The result of the last AWS Lambda invocation of your Lambda function.
- maximum_
batching_ floatwindow_ in_ seconds 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_secondsexpires orbatch_sizehas 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_ floatage_ in_ seconds - maximum_
retry_ floatattempts - 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),LATESTorTRIM_HORIZONif 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_ strtimestamp A timestamp in RFC3339 format of the data record which to start reading when using
starting_positionset 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. *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 tofalse. *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_ strreason The reason the event source mapping is in its current state.
- uuid str
The UUID of the created event source mapping.
Supporting Types
EventSourceMappingDestinationConfig
- On
Failure EventSource Mapping Destination Config On Failure Args The destination configuration for failed invocations. Detailed below.
- On
Failure EventSource Mapping Destination Config On Failure The destination configuration for failed invocations. Detailed below.
- on
Failure EventSource Mapping Destination Config On Failure The destination configuration for failed invocations. Detailed below.
- on_
failure Dict[EventSource Mapping Destination Config On Failure] The destination configuration for failed invocations. Detailed below.
EventSourceMappingDestinationConfigOnFailure
- Destination
Arn string The Amazon Resource Name (ARN) of the destination resource.
- Destination
Arn string The Amazon Resource Name (ARN) of the destination resource.
- destination
Arn 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
awsTerraform Provider.