fivepapertigers / serverless-plugin-pubsub

Simple pub/sub configuration with queueing for the Serverless Framework

Home Page:https://www.npmjs.com/package/serverless-plugin-pubsub/access

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support filterPolicies

Jace25 opened this issue · comments

It seems that one is not able to use filter policys like

functions:
    function:
...
        events:
            - pubSub:
                topic:
                    name: 'TopicName'
                    arn: 'arn:aws:sns:eu-central-1:account:TopicName'
                queue: true
                filterPolicy:
                    pets:
                        - cats
                        - dogs  

Queue is generated corrently and added to topic, but no filter are set.

Got it. Sorry. Should rtfm before

    function:
...
        events:
            - pubSub:
                topic:
                    name: 'TopicName'
                    arn: 'arn:aws:sns:eu-central-1:account:TopicName'
                    subscription:
                        FilterPolicy:
                            event_type:
                                - New.*
                queue:
                    name: 'Test-Consumer-Queue'