-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNS: payload-based message filtering #23079
Comments
Thanks for the request, it seems like CloudFormation support should be live already with this feature so we should be good to start working on it. Edit: We need the CfnSpec to merge this update first before we can merge the PR. Thanks for the contribution! |
I can create a PR for this if the effort is small. Do you know where the changes would need to be made? |
PR: #23108 |
---- closes #23079 ### Description This PR adds support for FilterPolicyScope for SNS subscriptions. This is in response to AWS introducing payload-based message filtering: https://aws.amazon.com/blogs/compute/introducing-payload-based-message-filtering-for-amazon-sns/. ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
---- closes aws#23079 ### Description This PR adds support for FilterPolicyScope for SNS subscriptions. This is in response to AWS introducing payload-based message filtering: https://aws.amazon.com/blogs/compute/introducing-payload-based-message-filtering-for-amazon-sns/. ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
---- closes aws#23079 ### Description This PR adds support for FilterPolicyScope for SNS subscriptions. This is in response to AWS introducing payload-based message filtering: https://aws.amazon.com/blogs/compute/introducing-payload-based-message-filtering-for-amazon-sns/. ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the feature
AWS introduced payload-based message filtering: https://aws.amazon.com/blogs/compute/introducing-payload-based-message-filtering-for-amazon-sns/. Would be awesome to see support for this in CDK.
Use Case
Filtering out messages by payload attributes. Often, SNS owners from away teams do not supply the sufficient message attributes to filter out messages. This change would allow SNS subscribers (SQS subscribing to SNS in my case) to filter messages regardless of whether the SNS owner has configured any message attributes.
Proposed Solution
Have the option to choose
FilterPolicyScope
when subscribing to an SNS topic i.e. eitherMessageBody
orMessageAttributes
. See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html. I was thinking to addfilterPolicyScope
to theSubscriptionFilter
class and then being able to switchfilterPolicyScope
to eitherMessageBody
orMessageAttributes
.Before:
After:
Other Information
Links
Acknowledgements
CDK version used
2.38.1 (aws-cdk-lib)
Environment details (OS name and version, etc.)
MacOS 12.3.1
The text was updated successfully, but these errors were encountered: