so far I have set up an SNS topic with 2 SQS subscriptions to it. Each SQS has a lambda trigger associated with it.
When I send the message via SNS.publish like this to send message to the 2nd SQS subscription:
response = sns.publish(
TopicArn='arn:aws:sns:us-west-2:234723472:test',
Message=json.dumps({'default': json.dumps({"c": code, "event_type": queuename})}),
MessageAttributes={'event_type':{'DataType':'String', 'StringValue':queuename}
)
the queue remains empty.
yet, when I send a message directly to the queue, the lambda trigger works. But the messages seem to be not getting past once sent to SNS. No errors is triggered. It's frustrating that SNS doesn't show a log of messages it received so I can't really debug things here.
What could I be missing?
I also tried with and without MessageStructure='json'
above and it made no difference.
It's frustrating not knowing where the silent error is happening in AWS.