Idempotency Is Not Optional in Event Pipelines
Retries are not a bug in distributed systems. They are the contract. The moment you put SQS or EventBridge between two services, you have accepted that some messages will arrive twice. The only question is whether your consumer notices.
The failure mode
A payment webhook fires. Your consumer processes it, writes a row, and then the network drops the acknowledgement. The broker, having heard nothing, redelivers. Now you have charged the customer twice, and no exception was ever thrown.
The fix
Give every message a stable idempotency key derived from its content, not its delivery. Record processed keys in a store with a TTL. On each message, check first, act second.
That is the whole idea. The rest is choosing where the key lives and how long you keep it.