Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.
lambda_create_event_source_mapping(EventSourceArn, FunctionName,
Enabled, BatchSize, StartingPosition, StartingPositionTimestamp)
[required] The Amazon Resource Name (ARN) of the event source.
Amazon Kinesis - The ARN of the data stream or a stream consumer.
Amazon DynamoDB Streams - The ARN of the stream.
Amazon Simple Queue Service - The ARN of the queue.
[required] The name of the Lambda function.
Name formats
Function name - MyFunction
.
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
Version or Alias ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
.
Partial ARN - 123456789012:function:MyFunction
.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
Disables the event source mapping to pause polling and invocation.
The maximum number of items to retrieve in a single batch.
Amazon Kinesis - Default 100. Max 10,000.
Amazon DynamoDB Streams - Default 100. Max 1,000.
Amazon Simple Queue Service - Default 10. Max 10.
The position in a stream from which to start reading. Required for
Amazon Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP
is
only supported for Amazon Kinesis streams.
With StartingPosition
set to AT_TIMESTAMP
, the time from which to
start reading.
svc$create_event_source_mapping( EventSourceArn = "string", FunctionName = "string", Enabled = TRUE|FALSE, BatchSize = 123, StartingPosition = "TRIM_HORIZON"|"LATEST"|"AT_TIMESTAMP", StartingPositionTimestamp = as.POSIXct( "2015-01-01" ) )
For details about each event source type, see the following topics.