1 comment

[ 3.1 ms ] story [ 14.0 ms ] thread
Reminder that SNS has at-least-once semantics, not just in theory but in practice: we have FaaS instances that see duplicates from SNS several times a day.

So if you are using SNS as a pub/sub bus for any kind of transactional activity (as in the examples above, where it's used for delivery of order_placed messages), be sure to build in some dupe-detection. The window seems to be on the order of minutes and I presume it's due to some distributed aspect of SNS internals. We keep MessageId history for a day for duplicate detection.

This is also why we won't use SNS for SMS to end-users, where a dupe would throw shade on us. We treat it strictly as a message fan-out for internal use.