add documentation

This commit is contained in:
Eetu Tuomala 2018-08-20 01:15:24 +03:00
parent b204d7a83f
commit f40f2abe78
No known key found for this signature in database
GPG Key ID: 15EE9116EB7F98E7

View File

@ -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
```