Skip to content

SNS Filters not honoring Message Body Filter #82

Open
@wilsondy

Description

The following snippet behaves differently between local stack and aws:

 topic.addSubscription(
          new SqsSubscription(queue, {
            filterPolicyWithMessageBody: {
              eventType: sns.FilterOrPolicy.filter(
                sns.SubscriptionFilter.stringFilter({
                  allowlist: [...listener.getEventTypes()],
                })
              ),
            },
          })

sns get-subscription-attributes:
In AWS via CDK:
"FilterPolicyScope": "MessageBody",
via CDKLocal:
"FilterPolicyScope": "MessageAttributes"

Env:
Node 16.15.1 + "aws-cdk-lib": "2.68.0",

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions