paws.compute (version 0.1.0)

lambda_create_event_source_mapping: Creates a mapping between an event source and an AWS Lambda function

Description

Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.

Usage

lambda_create_event_source_mapping(EventSourceArn, FunctionName,
  Enabled, BatchSize, StartingPosition, StartingPositionTimestamp)

Arguments

EventSourceArn

[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.

FunctionName

[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.

Enabled

Disables the event source mapping to pause polling and invocation.

BatchSize

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.

StartingPosition

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.

StartingPositionTimestamp

With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.

Request syntax

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"
  )
)

Details

For details about each event source type, see the following topics.