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
Adds FilterPolicy to SNS event #5229
Conversation
1a7ab6d
to
449cdd1
Compare
449cdd1
to
1895008
Compare
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.
@laardee thanks for this change! Yeah the resource limit is a common issue and we should stick to a minimum.
Option would be to write separate subscription resource only when filter policy exists.
Yes, let's do that. I'd hate to add unnecessary resources for basic SNS users just to support FilterPolicy, even if they don't use it.
@eahefnawy There were already so many conditions that I thought that it would be even more complex if the separate subscription is created only when filter policy exists, but I think it turned out quite ok. |
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.
Thank you for adding this feature @laardee
LGTM 👍 and also like the solution which resources keep minimum 💯
Is it a normal procedure that the documentation gets updated before the features are released? I was really happy to see that this feature is now supported in https://serverless.com/framework/docs/providers/aws/events/sns/ |
@esbenvb |
@esbenvb @JVUnderground you are correct, it is very misleading that docs are updated before release (what in a worst case takes weeks). I guess the docs are updated once the PR is merged to the master branch. gitflow or similar could be an option. Then the docs would be updated when the new version is released. If you already haven't, you could open a new issue considering this. |
@laardee Thanks for this. Can i have two filter policies? Trying it but cant get to work...
on node:
output:
|
Found the problem. Scope also needs to be an array. Thanks!
|
What did you implement:
Closes #5221
How did you implement it:
Inline subscription for the topic doesn't support filter policy, so I changed the subscription to be separate resource.
This increases the resource count in the template, so it can be an issue if someone has a stack which is hitting the limits and updates the a new version.
Option would be to write separate subscription resource only when filter policy exists.
How can we verify it:
Example setup for creation a subscription with a filter policy
Todos:
Is this ready for review?: YES
Is it a breaking change?: NO