A state is a distinct condition of a process that determines which transitions are possible. A finite state machine defines a start state, an end state, and permitted movement between states. section 16.3.1
For an image-processing workflow, the useful results are Created, Uploaded, and Processed. The workflow records completed actions rather than partial progress such as 10% uploaded or 30% processed. section 16.3.1
Use state transitions to make failure recovery predictable:
- Permit only defined transitions, such as Created → Uploaded → Processed; reject unsupported movements. section 16.3.1
- Make each transition idempotent so repeating it produces the same result, allowing the entire transition to be retried after failure. section 16.3.1
- Persist state outside an EC2 instance when fault tolerance matters, and use redundant instances rather than relying on one server. section 16.4
Applying a transition
An uploaded(s3Key) operation can read a process from DynamoDB, verify that its current state permits the transition, update the state to Uploaded with the S3 key, and send a processing message through SQS. section 16.3.1
(Created) -> (Uploaded) -> (Processed)
Browse the Created → Uploaded → Processed state sequence as a compact workflow diagram. section 16.3.1






































