Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

Idempotent receipts

This revision card explains Idempotent receipts. It starts from the need that s3 can retry the same ObjectCreated event. Double email confuses users. It describes idempotent = doing the same work twice is safe. Key the DynamoDB receipt by object versionId or etag; skip if already sent. The how-to section notes putItem with condition attribute_not_exists(receiptId) or GetItem first; only then SendEmail. An example on the card is two deliveries of the same event , then one email, one DynamoDB row.

Idempotent receipts S3 can retry the same ObjectCreated event. Double email confuses users. Idempotent = doing the same work twice is safe. Key the DynamoDB receipt by object versionId or etag; skip if already sent. PutItem with condition attribute_not_exists(receiptId) or GetItem first; only then SendEmail. Two deliveries of the same event → one email, one DynamoDB row.
Idempotent receipts · Download PNG
Read card text

What this card says

Why do we need it?

S3 can retry the same ObjectCreated event. Double email confuses users.

What is it?

Idempotent = doing the same work twice is safe. Key the DynamoDB receipt by object versionId or etag; skip if already sent.

How to do it

PutItem with condition attribute_not_exists(receiptId) or GetItem first; only then SendEmail.

attribute_not_exists

Example

Two deliveries of the same event → one email, one DynamoDB row.

See all AWS revision cards