-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Feature: SNS Event FilterPolicyScope attribute #2988
Feature: SNS Event FilterPolicyScope attribute #2988
Conversation
…t-filter-policy-scope-attribute
tests/translator/input/function_with_sns_event_source_all_parameters.yaml
Outdated
Show resolved
Hide resolved
…sion update with eol set to lf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening the PR. The changes look good. I have one question before I approve. I see that FilterPolicyScope
supports two possible value, MessageAttributes
or MessageBody
. Is there any reason we aren't testing MessageBody
as an input?
edit: I meant integration test, not transform test.
The test will pass no matter what I change the value to. I set it to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!!
Issue #, if available
N/A
Description of changes
Adds the FilterPolicyScope attribute to the SNS Subscription created for a SNS function event source.
This attribute is supported by cloudformation:
https://aws.amazon.com/blogs/compute/introducing-payload-based-message-filtering-for-amazon-sns/
If you try to deploy a function with event
sam deploy
gives this outputDescription of how you validated changes
I deployed a transformed template with the FilterPolicyScope: MessageAttributes added.
Checklist
Examples?
Deploy a Function with a SNS event source and add property:
FilterPolicyScope: MessageAttributes
Please reach out in the comments if you want to add an example. Examples will be
added to
sam init
through aws/aws-sam-cli-app-templates.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.