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",
The following snippet behaves differently between local stack and aws:
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",