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

    Interface SnsLambdaConsumerArgs

    interface SnsLambdaConsumerArgs {
        alarmTopicArn: Input<string>;
        extraTopics?: {
            filterPolicy?: Input<string>;
            key: string;
            topicArn: Input<string>;
        }[];
        filterPolicy?: Input<string>;
        lambda: { arn: Input<string>; name: Input<string>; role: 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 (now cfx-vpc) 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.

    extraTopics?: {
        filterPolicy?: Input<string>;
        key: string;
        topicArn: Input<string>;
    }[]

    More topics the same function consumes, each with its own permission and subscription, all parking in the one DLQ. A second consumer on the function would instead fight over its single on-failure destination and dlq-send policy. key names the resources; never rename it.

    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). An event allow-list must be the list the handler's dispatch is typed on, as every internal-bus consumer's is (InternalEventHandlers), or it drifts.

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

    The consuming function. aws.lambda.Permission identifies it by NAME, aws.sns.TopicSubscription needs its ARN, and role (the execution role ARN) is the principal that sends a failed invocation to the DLQ.

    retentionSeconds?: number

    DLQ retention. Defaults to 14 days.

    topicArn: Input<string>

    Topic to subscribe to, e.g. CUSTOMER_EVENTS_TOPIC_ARN.