@cfxlabsinc/b2b-services
    Preparing search index...

    Interface SnsLambdaConsumerArgs

    interface SnsLambdaConsumerArgs {
        alarmTopicArn: Input<string>;
        filterPolicy?: Input<string>;
        lambda: { arn: Input<string>; name: Input<string> };
        retentionSeconds?: number;
        topicArn: Input<string>;
    }
    Index
    alarmTopicArn: Input<string>

    SNS topic for the DLQ's message-age alarm. Required, not optional, for the same reason as LambdaApp.alarmTopicArn: a dead-letter queue that silently ships without this alarm is precisely the failure the alarm exists to catch — the queue looks healthy and the event is deleted at retention.

    Passed in rather than read from ALARM_TOPIC_ARN inside this file, which is the standing convention for everything in this package. A shared component that resolves a stack output itself makes the coupling invisible at every call site: when alarmTopicArn moved to cfx-ecs on 2026-08-03, ~20 lambda stacks broke at once in a file none of them mention. Every caller here already imports ALARM_TOPIC_ARN.

    filterPolicy?: Input<string>

    SNS message-filter policy, already serialized. Omit to receive everything.

    Filtering is a real decision, not a default: SNS ANDs its filter keys, so a predicate that is an OR across two attributes cannot be expressed here at all and has to move into the consumer (see the reward consumer). And an allow-list declared here can drift from the handler's own dispatch — the backoffice consumers deliberately skip it for that reason. Build one with filterPolicyForEvents from @cfxlabsinc/events when it is genuinely deploy-time knowledge.

    lambda: { arn: Input<string>; name: Input<string> }

    The consuming function. Both fields are needed and they are not interchangeable: aws.lambda.Permission identifies the function by NAME, while aws.sns.TopicSubscription needs its ARN as the endpoint.

    retentionSeconds?: number

    DLQ retention. Defaults to 14 days.

    topicArn: Input<string>

    Topic to subscribe to, e.g. CUSTOMER_EVENTS_TOPIC_ARN.