MDAA TS Docs
    Preparing search index...

    Binding between a function and a queue declared in the same module config, creating a Lambda event source mapping which polls the queue and invokes the function with batches of messages.

    Use cases: Queue-driven data processing; Batched transformation; Partial failure handling

    AWS: Lambda event source mapping with an SQS event source

    Validation: Optional properties only; the binding's key must name a queue declared under the module's queues section

    interface SqsEventSourceProps {
        batchSize?: number;
        enabled?: boolean;
        filterCriteria?: SqsEventFilterPattern[];
        maxBatchingWindowSeconds?: number;
        maxConcurrency?: number;
        reportBatchItemFailures?: boolean;
    }
    Index

    Properties

    batchSize?: number

    Maximum number of messages delivered to the function in a single invocation. Batches above 10 require maxBatchingWindowSeconds to also be set.

    10
    
    enabled?: boolean

    Whether the event source mapping polls the queue. Set to false to deploy the mapping in a stopped state and enable it later.

    true
    
    filterCriteria?: SqsEventFilterPattern[]

    Filter patterns restricting which messages are delivered to the function. A message is delivered if it matches any one of the patterns.

    - all messages are delivered
    
    maxBatchingWindowSeconds?: number

    Maximum seconds to gather messages before invoking the function, trading latency for fewer, larger batches.

    0 seconds - invoke as soon as batchSize messages are available
    
    maxConcurrency?: number

    Maximum concurrent function invocations this event source will drive, applying backpressure so that a queue backlog cannot exhaust account concurrency.

    - unlimited, bounded only by account concurrency
    
    reportBatchItemFailures?: boolean

    Whether the function reports individual message failures, so that only the failed messages return to the queue instead of the entire batch. Requires the function to return a batchItemFailures payload.

    false