Trigger Amazon SNS message via Amazon Lambda -


i have amazon lambda instance , amazon sns instance. lambda code watches changes in our database , make call amazon sns send pushes our users. example:

when user on 1 of our forums gets new message, lambda code recognizes change every time run (every 10 minutes) , should send push user's smartphone via sns.

i'm running wall when comes documentation; amazon's docs talk how trigger lambda code via sns, not reverse. have example of how can accomplish this?

yes, can use aws lambda achieve want. need give proper iam permissions allowing lambda iam role publish messages sns topic.

example sns publish iam policy:

{     "statement":[ {         "effect":"allow",         "action":"sns:publish",         "resource":"arn:aws:sns:*:<your account id>:<your topic id>"     } ] } 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -