I have a lambda fuction which is subscribed to sns topic. The lambda function sends some message to slack channel with the information passed from sns topic for example { fruit = apple}. Value of apple is posted on slack
Now I am experiencing a problem where multiple messages lets say total 3 messages are sent to sns topic with different values of fruit. The information in lambda is overwritten by the value of latest message in sns topic. ( i.e 3rd message) in other words the values of fruit of the 1st message or 2nd message is not posted on slack.
So how do I make sure that multiple lambda are invoked for multiple messages in the sns topic like 1 message per 1 lambda invocation from a single sns topic. Right now it's like for all the messages single lambda is invoked.