Ravi Sir's Cards › AWS
How do you avoid double receipt emails?
This interview card answers: How do you avoid double receipt emails? S3 may deliver the same event more than once; handlers must be idempotent. Key receipts by object etag/versionId; skip SendEmail if the row exists. PutItem ConditionExpression attribute_not_exists(receiptId) before SES.
Read card text
What this card says
What it is
S3 may deliver the same event more than once; handlers must be idempotent.
Why it matters
Key receipts by object etag/versionId; skip SendEmail if the row exists.
How / example
PutItem ConditionExpression attribute_not_exists(receiptId) before SES.