Learn R Programming

paws.compute (version 0.1.12)

lambda_update_event_source_mapping: Updates an event source mapping

Description

Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.

The following error handling options are only available for stream sources (DynamoDB and Kinesis):

  • BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

  • DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

  • MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

  • MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

  • ParallelizationFactor - Process multiple batches from each shard concurrently.

Usage

lambda_update_event_source_mapping(UUID, FunctionName, Enabled,
  BatchSize, MaximumBatchingWindowInSeconds, DestinationConfig,
  MaximumRecordAgeInSeconds, BisectBatchOnFunctionError,
  MaximumRetryAttempts, ParallelizationFactor, SourceAccessConfigurations,
  TumblingWindowInSeconds, FunctionResponseTypes)

Value

A list with the following syntax:

list(
  UUID = "string",
  StartingPosition = "TRIM_HORIZON"|"LATEST"|"AT_TIMESTAMP",
  StartingPositionTimestamp = as.POSIXct(
    "2015-01-01"
  ),
  BatchSize = 123,
  MaximumBatchingWindowInSeconds = 123,
  ParallelizationFactor = 123,
  EventSourceArn = "string",
  FunctionArn = "string",
  LastModified = as.POSIXct(
    "2015-01-01"
  ),
  LastProcessingResult = "string",
  State = "string",
  StateTransitionReason = "string",
  DestinationConfig = list(
    OnSuccess = list(
      Destination = "string"
    ),
    OnFailure = list(
      Destination = "string"
    )
  ),
  Topics = list(
    "string"
  ),
  Queues = list(
    "string"
  ),
  SourceAccessConfigurations = list(
    list(
      Type = "BASIC_AUTH"|"VPC_SUBNET"|"VPC_SECURITY_GROUP"|"SASL_SCRAM_512_AUTH"|"SASL_SCRAM_256_AUTH",
      URI = "string"
    )
  ),
  SelfManagedEventSource = list(
    Endpoints = list(
      list(
        "string"
      )
    )
  ),
  MaximumRecordAgeInSeconds = 123,
  BisectBatchOnFunctionError = TRUE|FALSE,
  MaximumRetryAttempts = 123,
  TumblingWindowInSeconds = 123,
  FunctionResponseTypes = list(
    "ReportBatchItemFailures"
  )
)

Arguments

UUID

[required] The identifier of the event source mapping.

FunctionName

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

If true, the event source mapping is active. Set to false 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. For standard queues the max is 10,000. For FIFO queues the max is 10.

  • Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • Self-Managed Apache Kafka - Default 100. Max 10,000.

MaximumBatchingWindowInSeconds

(Streams and SQS standard queues) The maximum amount of time to gather records before invoking the function, in seconds.

DestinationConfig

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

MaximumRecordAgeInSeconds

(Streams) Discard records older than the specified age. The default value is infinite (-1).

BisectBatchOnFunctionError

(Streams) If the function returns an error, split the batch in two and retry.

MaximumRetryAttempts

(Streams) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records will be retried until the record expires.

ParallelizationFactor

(Streams) The number of batches to process from each shard concurrently.

SourceAccessConfigurations

An array of the authentication protocol, or the VPC components to secure your event source.

TumblingWindowInSeconds

(Streams) The duration of a processing window in seconds. The range is between 1 second up to 15 minutes.

FunctionResponseTypes

(Streams) A list of current response type enums applied to the event source mapping.

Request syntax

svc$update_event_source_mapping(
  UUID = "string",
  FunctionName = "string",
  Enabled = TRUE|FALSE,
  BatchSize = 123,
  MaximumBatchingWindowInSeconds = 123,
  DestinationConfig = list(
    OnSuccess = list(
      Destination = "string"
    ),
    OnFailure = list(
      Destination = "string"
    )
  ),
  MaximumRecordAgeInSeconds = 123,
  BisectBatchOnFunctionError = TRUE|FALSE,
  MaximumRetryAttempts = 123,
  ParallelizationFactor = 123,
  SourceAccessConfigurations = list(
    list(
      Type = "BASIC_AUTH"|"VPC_SUBNET"|"VPC_SECURITY_GROUP"|"SASL_SCRAM_512_AUTH"|"SASL_SCRAM_256_AUTH",
      URI = "string"
    )
  ),
  TumblingWindowInSeconds = 123,
  FunctionResponseTypes = list(
    "ReportBatchItemFailures"
  )
)

Examples

Run this code
if (FALSE) {
# This operation updates a Lambda function event source mapping
svc$update_event_source_mapping(
  BatchSize = 123L,
  Enabled = TRUE,
  FunctionName = "myFunction",
  UUID = "1234xCy789012"
)
}

Run the code above in your browser using DataLab