I have two separate CloudFormation configurations.
One creates the SNS resource and I want to use it in my second configuration as events in Lambda with filterPolicy on MessageAttributes.
I have referred this link to configure my Lambda.
Everything works but the filtering of the message is not working. Lambda is invoked for every messages.
Here is my code snippet
functions: WorkerLambda: name: WorkerForMsgCode063 handler: main runtime: go1.x events: - sns: arn: <topic ARN from other cloudformation stack> filterPolicy: MsgCode: - 063
I checked that above serverless config creates the lambda with SNS trigger but when I see the SNS Topic (created by other stack) in AWS console it doesn’t show any subscription.