Serverless SNS filterPolicy does not put filter in place when subscription created










3














I'm using the following function definition:



missing:
handler: functions/eeegMissing.handler
events:
- sns: arn:aws:sns:us-west-2:xxx
filterPolicy:
type:
- EPILOG_PAGE_DATA_RECEIVED


The SNS topic already exists. When I deploy it, a subscription is created with the name



arn:aws:lambda:us-west-2:xxx:function:eeeg-dev-missing` 


but the filter is blank. I would expect the filter to show as:



 "type":["EPILOG_PAGE_DATA_RECEIVED"]


What am I missing?










share|improve this question























  • I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
    – zx485
    Nov 12 '18 at 22:38











  • @zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
    – Robel Robel Lingstuyl
    Nov 13 '18 at 23:05










  • I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
    – zx485
    Nov 13 '18 at 23:09















3














I'm using the following function definition:



missing:
handler: functions/eeegMissing.handler
events:
- sns: arn:aws:sns:us-west-2:xxx
filterPolicy:
type:
- EPILOG_PAGE_DATA_RECEIVED


The SNS topic already exists. When I deploy it, a subscription is created with the name



arn:aws:lambda:us-west-2:xxx:function:eeeg-dev-missing` 


but the filter is blank. I would expect the filter to show as:



 "type":["EPILOG_PAGE_DATA_RECEIVED"]


What am I missing?










share|improve this question























  • I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
    – zx485
    Nov 12 '18 at 22:38











  • @zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
    – Robel Robel Lingstuyl
    Nov 13 '18 at 23:05










  • I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
    – zx485
    Nov 13 '18 at 23:09













3












3








3







I'm using the following function definition:



missing:
handler: functions/eeegMissing.handler
events:
- sns: arn:aws:sns:us-west-2:xxx
filterPolicy:
type:
- EPILOG_PAGE_DATA_RECEIVED


The SNS topic already exists. When I deploy it, a subscription is created with the name



arn:aws:lambda:us-west-2:xxx:function:eeeg-dev-missing` 


but the filter is blank. I would expect the filter to show as:



 "type":["EPILOG_PAGE_DATA_RECEIVED"]


What am I missing?










share|improve this question















I'm using the following function definition:



missing:
handler: functions/eeegMissing.handler
events:
- sns: arn:aws:sns:us-west-2:xxx
filterPolicy:
type:
- EPILOG_PAGE_DATA_RECEIVED


The SNS topic already exists. When I deploy it, a subscription is created with the name



arn:aws:lambda:us-west-2:xxx:function:eeeg-dev-missing` 


but the filter is blank. I would expect the filter to show as:



 "type":["EPILOG_PAGE_DATA_RECEIVED"]


What am I missing?







amazon-sns serverless aws-serverless






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 22:38









zx485

13.5k122946




13.5k122946










asked Nov 12 '18 at 20:06









Robel Robel LingstuylRobel Robel Lingstuyl

16012




16012











  • I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
    – zx485
    Nov 12 '18 at 22:38











  • @zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
    – Robel Robel Lingstuyl
    Nov 13 '18 at 23:05










  • I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
    – zx485
    Nov 13 '18 at 23:09
















  • I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
    – zx485
    Nov 12 '18 at 22:38











  • @zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
    – Robel Robel Lingstuyl
    Nov 13 '18 at 23:05










  • I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
    – zx485
    Nov 13 '18 at 23:09















I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
– zx485
Nov 12 '18 at 22:38





I removed your unnecessary code quotes. Please inform yourself how to use code sections in your questions and answers.
– zx485
Nov 12 '18 at 22:38













@zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
– Robel Robel Lingstuyl
Nov 13 '18 at 23:05




@zx485 thanks, I tried to update it but at the time I didn't see the edit option... I'll do better :D
– Robel Robel Lingstuyl
Nov 13 '18 at 23:05












I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
– zx485
Nov 13 '18 at 23:09




I'm glad that you saw some sense in my comment. Understanding this will give you a bright future on SO.
– zx485
Nov 13 '18 at 23:09












1 Answer
1






active

oldest

votes


















0














You just have a minor syntax error. I have a Serverless function with the following event and it works:



events:
- sns:
arn: $self:custom.devicesTopicArn
filterPolicy:
operation:
- INSERT


So in your case, it should be:



missing:
handler: functions/eeegMissing.handler
events:
- sns:
arn: arn:aws:sns:us-west-2:xxx
filterPolicy:
type:
- EPILOG_PAGE_DATA_RECEIVED





share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269342%2fserverless-sns-filterpolicy-does-not-put-filter-in-place-when-subscription-creat%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You just have a minor syntax error. I have a Serverless function with the following event and it works:



    events:
    - sns:
    arn: $self:custom.devicesTopicArn
    filterPolicy:
    operation:
    - INSERT


    So in your case, it should be:



    missing:
    handler: functions/eeegMissing.handler
    events:
    - sns:
    arn: arn:aws:sns:us-west-2:xxx
    filterPolicy:
    type:
    - EPILOG_PAGE_DATA_RECEIVED





    share|improve this answer

























      0














      You just have a minor syntax error. I have a Serverless function with the following event and it works:



      events:
      - sns:
      arn: $self:custom.devicesTopicArn
      filterPolicy:
      operation:
      - INSERT


      So in your case, it should be:



      missing:
      handler: functions/eeegMissing.handler
      events:
      - sns:
      arn: arn:aws:sns:us-west-2:xxx
      filterPolicy:
      type:
      - EPILOG_PAGE_DATA_RECEIVED





      share|improve this answer























        0












        0








        0






        You just have a minor syntax error. I have a Serverless function with the following event and it works:



        events:
        - sns:
        arn: $self:custom.devicesTopicArn
        filterPolicy:
        operation:
        - INSERT


        So in your case, it should be:



        missing:
        handler: functions/eeegMissing.handler
        events:
        - sns:
        arn: arn:aws:sns:us-west-2:xxx
        filterPolicy:
        type:
        - EPILOG_PAGE_DATA_RECEIVED





        share|improve this answer












        You just have a minor syntax error. I have a Serverless function with the following event and it works:



        events:
        - sns:
        arn: $self:custom.devicesTopicArn
        filterPolicy:
        operation:
        - INSERT


        So in your case, it should be:



        missing:
        handler: functions/eeegMissing.handler
        events:
        - sns:
        arn: arn:aws:sns:us-west-2:xxx
        filterPolicy:
        type:
        - EPILOG_PAGE_DATA_RECEIVED






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 13 '18 at 3:29









        leon.valencialeon.valencia

        2,163149




        2,163149



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269342%2fserverless-sns-filterpolicy-does-not-put-filter-in-place-when-subscription-creat%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto