3 ms·
I think it may depend on your architecture, but naively: - SQS to send alert, all modes - Lambda reading that queue, filtering on user settings - SNS per mod
by zmgsabst 4y ago
I think it may depend on your architecture, but naively:
- SQS to send alert, all modes
- Lambda reading that queue, filtering on user settings
- SNS per mode of communication, eg email or text
My thinking is that you’d want to filter on user preference early, to prevent repeated work. A benefit of this approach is you prevent combinatorial complexity if you have both selection on kinds of alerts delivered and way to deliver alerts: the Lambda can handle all of that based on the user settings. And still a single SNS per communication channel.
Your gating Lambda can also implement other features, like volume aware decisions — where it eg, rejects “marketing” messages if there have been too many to a single customer recently while still allowing through “transaction” messages.