I created a Lambda function that will publish a message to a slack channel and I have it triggered by an SNS topic. Can I use the SNS subscription filter policy to pass data to my Lambda function so it can be read and used in the Lambda function? I assume Lambda could read the parameters passed from SNS in the Lambda with using event?
event['message']
I just don't want to create a Lambda function for each trigger I will create. I want to have one Lambda function, pass in the custom text from separate SNS topics therefore making the function reusable.
I have one SNS topic for CodeDeploy passing and one for it failing. I want to just pass in the message "CodeDeploy passed" or "CodeDepoy failed" into the Lambda function.
Thanks for any help or advice!!