liveBook · Manning

State

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A state is a distinct condition of a process in a state machine that determines which transitions are possible.

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

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Defines finite-state behavior and demonstrates DynamoDB checks, updates, and SQS messaging, without covering exhaustive workflow states.
Examples
Uses Created, Uploaded, and Processed image states plus EC2 stopping and termination as operational state examples.
What it assumes
Assumes no state-machine background and defines states, transitions, finite machines, and idempotence before applying them.
What you can do after
Build it from scratch by defining permitted states, validating transitions, persisting updates, and retrying idempotent operations.
How it connects
Connects state with finite state machines, idempotent actions, DynamoDB, SQS, S3, EC2, and fault tolerance.

Also explained in

Compare how 39 books explain state →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.