mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
add documentation
This commit is contained in:
parent
b204d7a83f
commit
f40f2abe78
@ -95,3 +95,20 @@ functions:
|
||||
topicName: aggregate
|
||||
displayName: Data aggregation pipeline
|
||||
```
|
||||
|
||||
## Setting a filter policy
|
||||
|
||||
This event definition creates an SNS topic which subscription uses a filter policy. The filter policy filters out messages that don't have attribute key `pet` with value `dog` or `cat`.
|
||||
|
||||
```yml
|
||||
functions:
|
||||
pets:
|
||||
handler: pets.handler
|
||||
events:
|
||||
- sns:
|
||||
topicName: pets
|
||||
filterPolicy:
|
||||
pet:
|
||||
- dog
|
||||
- cat
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user