Diagram
Comments
- EventBridge decouples the producer of an event from its consumers. Bus rules filter which events reach each target.
- Step Functions stores the state of each execution and retries steps with backoff. If a step fails, the workflow can run a compensating action.
- Aurora Serverless v2 scales capacity in seconds. Lambda can open many connections, so consider RDS Proxy.
- The arrows represent control flow. For very large payloads, store the content in S3 and pass only a reference in the event.
Information flow
- Amazon API Gateway
API Gateway receives the HTTP request and publishes an event to EventBridge.
- Amazon EventBridge
EventBridge evaluates the bus rules and sends the event to Step Functions.
- AWS Step Functions
Step Functions starts the state machine and invokes the validation Lambda function.
- AWS Lambda (validation and payment)
If validation succeeds, Step Functions invokes the payment Lambda function.
- Amazon Aurora Serverless v2
The payment function records the transaction in Aurora.