An idempotent state transition produces the same result no matter how many times it runs. This lets a fault-tolerant process retry an entire transition after a failure without creating an invalid state. section 16.3.1
The state machine tracks completed results rather than partial progress. In the Imagery application, the relevant states are Created, Uploaded, and Processed; intermediate upload or filtering progress is ignored. section 16.3.1
A practical transition follows this sequence:
- Allow a retry when the process is already in the target state instead of rejecting it as an invalid transition. section 16.3.1
- Repeat the DynamoDB update safely; duplicate updates do not harm the state machine. section 16.3.1
- Permit repeated SQS messages only when the consumer is idempotent as well. section 16.3.1
- Use a DynamoDB conditional update to combine the state check and update into one request, reducing races between concurrent processes. section 16.3.1
Imagery upload and processing
A process moves from Created to Uploaded with an S3 key, then from Uploaded to Processed with the S3 key of the sepia image. If sending the SQS message fails after DynamoDB succeeds, retrying repeats the safe state update and message publication. section 16.3 section 16.3.1
The architecture figure connects the asynchronous Imagery process with the AWS services used to implement it. section 16.3
