amazonka-lambda-2.0: Amazon Lambda SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Lambda.UpdateEventSourceMapping

Description

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

For details about how to configure different event sources, see the following topics.

The following error handling options are available only 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.

For information about which configuration parameters apply to each event source, see the following topics.

Synopsis

Creating a Request

data UpdateEventSourceMapping Source #

See: newUpdateEventSourceMapping smart constructor.

Constructors

UpdateEventSourceMapping' 

Fields

  • batchSize :: Maybe Natural

    The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

    • Amazon Kinesis - Default 100. Max 10,000.
    • Amazon DynamoDB Streams - Default 100. Max 10,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.
    • Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.
  • bisectBatchOnFunctionError :: Maybe Bool

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

  • destinationConfig :: Maybe DestinationConfig

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

  • enabled :: Maybe Bool

    When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

    Default: True

  • filterCriteria :: Maybe FilterCriteria

    An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

  • functionName :: Maybe Text

    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.

  • functionResponseTypes :: Maybe [FunctionResponseType]

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

  • maximumBatchingWindowInSeconds :: Maybe Natural

    The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

    For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

    Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

  • maximumRecordAgeInSeconds :: Maybe Int

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

  • maximumRetryAttempts :: Maybe Int

    (Streams only) 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 :: Maybe Natural

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

  • sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]

    An array of authentication protocols or VPC components required to secure your event source.

  • tumblingWindowInSeconds :: Maybe Natural

    (Streams only) The duration in seconds of a processing window. The range is between 1 second and 900 seconds.

  • uuid :: Text

    The identifier of the event source mapping.

Instances

Instances details
ToJSON UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

ToHeaders UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

ToPath UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

ToQuery UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

AWSRequest UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

Generic UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

Associated Types

type Rep UpdateEventSourceMapping :: Type -> Type #

Read UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

Show UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

NFData UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

Eq UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

Hashable UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

type AWSResponse UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

type Rep UpdateEventSourceMapping Source # 
Instance details

Defined in Amazonka.Lambda.UpdateEventSourceMapping

type Rep UpdateEventSourceMapping = D1 ('MetaData "UpdateEventSourceMapping" "Amazonka.Lambda.UpdateEventSourceMapping" "amazonka-lambda-2.0-FcjxCCKaCGK94C2lDO9alC" 'False) (C1 ('MetaCons "UpdateEventSourceMapping'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "batchSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "bisectBatchOnFunctionError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "destinationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DestinationConfig)))) :*: ((S1 ('MetaSel ('Just "enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "filterCriteria") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FilterCriteria))) :*: (S1 ('MetaSel ('Just "functionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "functionResponseTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [FunctionResponseType]))))) :*: ((S1 ('MetaSel ('Just "maximumBatchingWindowInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "maximumRecordAgeInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "maximumRetryAttempts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))) :*: ((S1 ('MetaSel ('Just "parallelizationFactor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "sourceAccessConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SourceAccessConfiguration]))) :*: (S1 ('MetaSel ('Just "tumblingWindowInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "uuid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))

newUpdateEventSourceMapping Source #

Create a value of UpdateEventSourceMapping with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

UpdateEventSourceMapping, updateEventSourceMapping_batchSize - The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

  • Amazon Kinesis - Default 100. Max 10,000.
  • Amazon DynamoDB Streams - Default 100. Max 10,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.
  • Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

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

UpdateEventSourceMapping, updateEventSourceMapping_destinationConfig - (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

$sel:enabled:UpdateEventSourceMapping', updateEventSourceMapping_enabled - When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

Default: True

UpdateEventSourceMapping, updateEventSourceMapping_filterCriteria - An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

UpdateEventSourceMapping, updateEventSourceMapping_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.

UpdateEventSourceMapping, updateEventSourceMapping_functionResponseTypes - (Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.

UpdateEventSourceMapping, updateEventSourceMapping_maximumBatchingWindowInSeconds - The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

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

UpdateEventSourceMapping, updateEventSourceMapping_maximumRetryAttempts - (Streams only) 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.

UpdateEventSourceMapping, updateEventSourceMapping_parallelizationFactor - (Streams only) The number of batches to process from each shard concurrently.

UpdateEventSourceMapping, updateEventSourceMapping_sourceAccessConfigurations - An array of authentication protocols or VPC components required to secure your event source.

UpdateEventSourceMapping, updateEventSourceMapping_tumblingWindowInSeconds - (Streams only) The duration in seconds of a processing window. The range is between 1 second and 900 seconds.

UpdateEventSourceMapping, updateEventSourceMapping_uuid - The identifier of the event source mapping.

Request Lenses

updateEventSourceMapping_batchSize :: Lens' UpdateEventSourceMapping (Maybe Natural) Source #

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

  • Amazon Kinesis - Default 100. Max 10,000.
  • Amazon DynamoDB Streams - Default 100. Max 10,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.
  • Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

updateEventSourceMapping_bisectBatchOnFunctionError :: Lens' UpdateEventSourceMapping (Maybe Bool) Source #

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

updateEventSourceMapping_destinationConfig :: Lens' UpdateEventSourceMapping (Maybe DestinationConfig) Source #

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

updateEventSourceMapping_enabled :: Lens' UpdateEventSourceMapping (Maybe Bool) Source #

When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

Default: True

updateEventSourceMapping_filterCriteria :: Lens' UpdateEventSourceMapping (Maybe FilterCriteria) Source #

An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

updateEventSourceMapping_functionName :: Lens' UpdateEventSourceMapping (Maybe Text) Source #

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.

updateEventSourceMapping_functionResponseTypes :: Lens' UpdateEventSourceMapping (Maybe [FunctionResponseType]) Source #

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

updateEventSourceMapping_maximumBatchingWindowInSeconds :: Lens' UpdateEventSourceMapping (Maybe Natural) Source #

The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

updateEventSourceMapping_maximumRecordAgeInSeconds :: Lens' UpdateEventSourceMapping (Maybe Int) Source #

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

updateEventSourceMapping_maximumRetryAttempts :: Lens' UpdateEventSourceMapping (Maybe Int) Source #

(Streams only) 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.

updateEventSourceMapping_parallelizationFactor :: Lens' UpdateEventSourceMapping (Maybe Natural) Source #

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

updateEventSourceMapping_sourceAccessConfigurations :: Lens' UpdateEventSourceMapping (Maybe [SourceAccessConfiguration]) Source #

An array of authentication protocols or VPC components required to secure your event source.

updateEventSourceMapping_tumblingWindowInSeconds :: Lens' UpdateEventSourceMapping (Maybe Natural) Source #

(Streams only) The duration in seconds of a processing window. The range is between 1 second and 900 seconds.

updateEventSourceMapping_uuid :: Lens' UpdateEventSourceMapping Text Source #

The identifier of the event source mapping.

Destructuring the Response

data EventSourceMappingConfiguration Source #

A mapping between an Amazon Web Services resource and a Lambda function. For details, see CreateEventSourceMapping.

See: newEventSourceMappingConfiguration smart constructor.

Constructors

EventSourceMappingConfiguration' 

Fields

  • amazonManagedKafkaEventSourceConfig :: Maybe AmazonManagedKafkaEventSourceConfig

    Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

  • batchSize :: Maybe Natural

    The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

    Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.

    Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

  • bisectBatchOnFunctionError :: Maybe Bool

    (Streams only) If the function returns an error, split the batch in two and retry. The default value is false.

  • destinationConfig :: Maybe DestinationConfig

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

  • eventSourceArn :: Maybe Text

    The Amazon Resource Name (ARN) of the event source.

  • filterCriteria :: Maybe FilterCriteria

    An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

  • functionArn :: Maybe Text

    The ARN of the Lambda function.

  • functionResponseTypes :: Maybe [FunctionResponseType]

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

  • lastModified :: Maybe POSIX

    The date that the event source mapping was last updated or that its state changed.

  • lastProcessingResult :: Maybe Text

    The result of the last Lambda invocation of your function.

  • maximumBatchingWindowInSeconds :: Maybe Natural

    The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

    For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

    Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

  • maximumRecordAgeInSeconds :: Maybe Int

    (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.

  • maximumRetryAttempts :: Maybe Int

    (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.

  • parallelizationFactor :: Maybe Natural

    (Streams only) The number of batches to process concurrently from each shard. The default value is 1.

  • queues :: Maybe (NonEmpty Text)

    (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.

  • selfManagedEventSource :: Maybe SelfManagedEventSource

    The self-managed Apache Kafka cluster for your event source.

  • selfManagedKafkaEventSourceConfig :: Maybe SelfManagedKafkaEventSourceConfig

    Specific configuration settings for a self-managed Apache Kafka event source.

  • sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]

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

  • startingPosition :: Maybe EventSourcePosition

    The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams.

  • startingPositionTimestamp :: Maybe POSIX

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

  • state :: Maybe Text

    The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.

  • stateTransitionReason :: Maybe Text

    Indicates whether a user or Lambda made the last change to the event source mapping.

  • topics :: Maybe (NonEmpty Text)

    The name of the Kafka topic.

  • tumblingWindowInSeconds :: Maybe Natural

    (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds.

  • uuid :: Maybe Text

    The identifier of the event source mapping.

Instances

Instances details
FromJSON EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

Generic EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

Associated Types

type Rep EventSourceMappingConfiguration :: Type -> Type #

Read EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

Show EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

NFData EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

Eq EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

Hashable EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

type Rep EventSourceMappingConfiguration Source # 
Instance details

Defined in Amazonka.Lambda.Types.EventSourceMappingConfiguration

type Rep EventSourceMappingConfiguration = D1 ('MetaData "EventSourceMappingConfiguration" "Amazonka.Lambda.Types.EventSourceMappingConfiguration" "amazonka-lambda-2.0-FcjxCCKaCGK94C2lDO9alC" 'False) (C1 ('MetaCons "EventSourceMappingConfiguration'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "amazonManagedKafkaEventSourceConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AmazonManagedKafkaEventSourceConfig)) :*: (S1 ('MetaSel ('Just "batchSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "bisectBatchOnFunctionError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "destinationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DestinationConfig)) :*: (S1 ('MetaSel ('Just "eventSourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "filterCriteria") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FilterCriteria))))) :*: ((S1 ('MetaSel ('Just "functionArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "functionResponseTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [FunctionResponseType])) :*: S1 ('MetaSel ('Just "lastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "lastProcessingResult") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maximumBatchingWindowInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "maximumRecordAgeInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))))) :*: (((S1 ('MetaSel ('Just "maximumRetryAttempts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "parallelizationFactor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "queues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Text))))) :*: (S1 ('MetaSel ('Just "selfManagedEventSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SelfManagedEventSource)) :*: (S1 ('MetaSel ('Just "selfManagedKafkaEventSourceConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SelfManagedKafkaEventSourceConfig)) :*: S1 ('MetaSel ('Just "sourceAccessConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SourceAccessConfiguration]))))) :*: ((S1 ('MetaSel ('Just "startingPosition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EventSourcePosition)) :*: (S1 ('MetaSel ('Just "startingPositionTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "stateTransitionReason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "topics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "tumblingWindowInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "uuid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))))

newEventSourceMappingConfiguration :: EventSourceMappingConfiguration Source #

Create a value of EventSourceMappingConfiguration with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:amazonManagedKafkaEventSourceConfig:EventSourceMappingConfiguration', eventSourceMappingConfiguration_amazonManagedKafkaEventSourceConfig - Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

$sel:batchSize:EventSourceMappingConfiguration', eventSourceMappingConfiguration_batchSize - The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.

Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

$sel:bisectBatchOnFunctionError:EventSourceMappingConfiguration', eventSourceMappingConfiguration_bisectBatchOnFunctionError - (Streams only) If the function returns an error, split the batch in two and retry. The default value is false.

$sel:destinationConfig:EventSourceMappingConfiguration', eventSourceMappingConfiguration_destinationConfig - (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

$sel:eventSourceArn:EventSourceMappingConfiguration', eventSourceMappingConfiguration_eventSourceArn - The Amazon Resource Name (ARN) of the event source.

$sel:filterCriteria:EventSourceMappingConfiguration', eventSourceMappingConfiguration_filterCriteria - An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

$sel:functionArn:EventSourceMappingConfiguration', eventSourceMappingConfiguration_functionArn - The ARN of the Lambda function.

$sel:functionResponseTypes:EventSourceMappingConfiguration', eventSourceMappingConfiguration_functionResponseTypes - (Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.

$sel:lastModified:EventSourceMappingConfiguration', eventSourceMappingConfiguration_lastModified - The date that the event source mapping was last updated or that its state changed.

$sel:lastProcessingResult:EventSourceMappingConfiguration', eventSourceMappingConfiguration_lastProcessingResult - The result of the last Lambda invocation of your function.

$sel:maximumBatchingWindowInSeconds:EventSourceMappingConfiguration', eventSourceMappingConfiguration_maximumBatchingWindowInSeconds - The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

$sel:maximumRecordAgeInSeconds:EventSourceMappingConfiguration', eventSourceMappingConfiguration_maximumRecordAgeInSeconds - (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.

$sel:maximumRetryAttempts:EventSourceMappingConfiguration', eventSourceMappingConfiguration_maximumRetryAttempts - (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.

$sel:parallelizationFactor:EventSourceMappingConfiguration', eventSourceMappingConfiguration_parallelizationFactor - (Streams only) The number of batches to process concurrently from each shard. The default value is 1.

$sel:queues:EventSourceMappingConfiguration', eventSourceMappingConfiguration_queues - (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.

$sel:selfManagedEventSource:EventSourceMappingConfiguration', eventSourceMappingConfiguration_selfManagedEventSource - The self-managed Apache Kafka cluster for your event source.

$sel:selfManagedKafkaEventSourceConfig:EventSourceMappingConfiguration', eventSourceMappingConfiguration_selfManagedKafkaEventSourceConfig - Specific configuration settings for a self-managed Apache Kafka event source.

$sel:sourceAccessConfigurations:EventSourceMappingConfiguration', eventSourceMappingConfiguration_sourceAccessConfigurations - An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.

$sel:startingPosition:EventSourceMappingConfiguration', eventSourceMappingConfiguration_startingPosition - The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams.

$sel:startingPositionTimestamp:EventSourceMappingConfiguration', eventSourceMappingConfiguration_startingPositionTimestamp - With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.

$sel:state:EventSourceMappingConfiguration', eventSourceMappingConfiguration_state - The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.

$sel:stateTransitionReason:EventSourceMappingConfiguration', eventSourceMappingConfiguration_stateTransitionReason - Indicates whether a user or Lambda made the last change to the event source mapping.

$sel:topics:EventSourceMappingConfiguration', eventSourceMappingConfiguration_topics - The name of the Kafka topic.

$sel:tumblingWindowInSeconds:EventSourceMappingConfiguration', eventSourceMappingConfiguration_tumblingWindowInSeconds - (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds.

$sel:uuid:EventSourceMappingConfiguration', eventSourceMappingConfiguration_uuid - The identifier of the event source mapping.

Response Lenses

eventSourceMappingConfiguration_amazonManagedKafkaEventSourceConfig :: Lens' EventSourceMappingConfiguration (Maybe AmazonManagedKafkaEventSourceConfig) Source #

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

eventSourceMappingConfiguration_batchSize :: Lens' EventSourceMappingConfiguration (Maybe Natural) Source #

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).

Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.

Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

eventSourceMappingConfiguration_bisectBatchOnFunctionError :: Lens' EventSourceMappingConfiguration (Maybe Bool) Source #

(Streams only) If the function returns an error, split the batch in two and retry. The default value is false.

eventSourceMappingConfiguration_destinationConfig :: Lens' EventSourceMappingConfiguration (Maybe DestinationConfig) Source #

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

eventSourceMappingConfiguration_filterCriteria :: Lens' EventSourceMappingConfiguration (Maybe FilterCriteria) Source #

An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

eventSourceMappingConfiguration_functionResponseTypes :: Lens' EventSourceMappingConfiguration (Maybe [FunctionResponseType]) Source #

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

eventSourceMappingConfiguration_lastModified :: Lens' EventSourceMappingConfiguration (Maybe UTCTime) Source #

The date that the event source mapping was last updated or that its state changed.

eventSourceMappingConfiguration_maximumBatchingWindowInSeconds :: Lens' EventSourceMappingConfiguration (Maybe Natural) Source #

The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure MaximumBatchingWindowInSeconds to any value from 0 seconds to 300 seconds in increments of seconds.

For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.

Related setting: For streams and Amazon SQS event sources, when you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

eventSourceMappingConfiguration_maximumRecordAgeInSeconds :: Lens' EventSourceMappingConfiguration (Maybe Int) Source #

(Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.

eventSourceMappingConfiguration_maximumRetryAttempts :: Lens' EventSourceMappingConfiguration (Maybe Int) Source #

(Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.

eventSourceMappingConfiguration_parallelizationFactor :: Lens' EventSourceMappingConfiguration (Maybe Natural) Source #

(Streams only) The number of batches to process concurrently from each shard. The default value is 1.

eventSourceMappingConfiguration_queues :: Lens' EventSourceMappingConfiguration (Maybe (NonEmpty Text)) Source #

(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.

eventSourceMappingConfiguration_sourceAccessConfigurations :: Lens' EventSourceMappingConfiguration (Maybe [SourceAccessConfiguration]) Source #

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

eventSourceMappingConfiguration_startingPosition :: Lens' EventSourceMappingConfiguration (Maybe EventSourcePosition) Source #

The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams.

eventSourceMappingConfiguration_startingPositionTimestamp :: Lens' EventSourceMappingConfiguration (Maybe UTCTime) Source #

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

eventSourceMappingConfiguration_state :: Lens' EventSourceMappingConfiguration (Maybe Text) Source #

The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.

eventSourceMappingConfiguration_stateTransitionReason :: Lens' EventSourceMappingConfiguration (Maybe Text) Source #

Indicates whether a user or Lambda made the last change to the event source mapping.

eventSourceMappingConfiguration_tumblingWindowInSeconds :: Lens' EventSourceMappingConfiguration (Maybe Natural) Source #

(Streams only) The duration in seconds of a processing window. The range is 1–900 seconds.