Application Integration on AWS: Step Functions, SQS, SNS, EventBridge and API Patterns

AWS Technical Essentials 45 min min read Updated: Nov 17, 2026 Beginner
Application Integration on AWS: Step Functions, SQS, SNS, EventBridge and API Patterns
Beginner Topic 1 of 3

Four Basic Patterns

PatternServiceIdea
Queue (buffer)SQSProducer drops work, consumers process at their pace
Pub/sub (fan-out)SNSOne message, many subscribers
Event routingEventBridgeRules send matching events to targets
Workflow (orchestration)Step FunctionsA visual state machine runs steps in order with retries

You met SQS, SNS and EventBridge earlier. This lesson adds Step Functions and shows how to choose.

AWS Step Functions

  • Build workflows that coordinate Lambda functions and over 200 AWS services
  • Defined in Amazon States Language (JSON) or drawn in Workflow Studio
  • Handles retries, error catching, waiting, parallel branches and human approval
  • Standard workflows: long running (up to 1 year), exactly-once. Express workflows: short, very high volume, cheaper per run
State typeUse
TaskDo work (invoke Lambda, call a service)
ChoiceIf / else branching
ParallelRun branches at the same time
MapDo the same step for each item in a list
WaitPause for time or until a date
Pass / Succeed / FailPass data, finish OK, finish with error
json { "Comment": "Order workflow", "StartAt": "ValidateOrder", "States": { "ValidateOrder": {"Type": "Task", "Resource": "arn:aws:lambda:ap-south-1:111111111111:function:validate", "Next": "InStock?", "Retry": [{"ErrorEquals": ["States.TaskFailed"], "IntervalSeconds": 2, "MaxAttempts": 3, "BackoffRate": 2}], "Catch": [{"ErrorEquals": ["States.ALL"], "Next": "OrderFailed"}]}, "InStock?": {"Type": "Choice", "Choices": [{"Variable": "$.inStock", "BooleanEquals": true, "Next": "ChargeCard"}], "Default": "OrderFailed"}, "ChargeCard": {"Type": "Task", "Resource": "arn:aws:lambda:ap-south-1:111111111111:function:charge", "Next": "NotifyCustomer"}, "NotifyCustomer": {"Type": "Task", "Resource": "arn:aws:states:::sns:publish", "Parameters": {"TopicArn": "arn:aws:sns:ap-south-1:111111111111:orders", "Message.$": "$.message"}, "End": true}, "OrderFailed": {"Type": "Fail", "Error": "OrderError", "Cause": "Validation or payment failed"} } }
bash aws stepfunctions create-state-machine --name order-flow --definition file://flow.json --role-arn arn:aws:iam::111111111111:role/StepFunctionsRole aws stepfunctions start-execution --state-machine-arn arn:aws:states:ap-south-1:111111111111:stateMachine:order-flow --input '{"inStock": true, "message": "Order received"}' aws stepfunctions list-executions --state-machine-arn arn:aws:states:ap-south-1:111111111111:stateMachine:order-flow --max-items 5

Choosing the Right Tool

NeedChoose
Smooth out spikes, retry failed jobsSQS (with DLQ)
Notify many systems at onceSNS
React to AWS events or SaaS events, schedulesEventBridge
Multi-step process with branching and retriesStep Functions
Real-time streaming dataKinesis or MSK
Migrate apps that use ActiveMQ or RabbitMQAmazon MQ
GraphQL API for appsAWS AppSync
Create REST APIsAPI Gateway

Choreography vs Orchestration

  • Choreography: services react to events on their own (SNS, EventBridge). Flexible but harder to see the whole flow
  • Orchestration: one coordinator (Step Functions) controls the order. Easier to follow and debug

Practice

  1. Create the sample state machine with Pass states and run it
  2. Add a Retry and a Catch to a Lambda task
  3. Use a Map state to process a list
  4. Build SNS to SQS fan-out with two queues

Conclusion

Use SQS to buffer, SNS to fan out, EventBridge to route events and Step Functions to orchestrate multi-step workflows with retries. Pick by the need, not by habit.

Quick Summary: patterns; Step Functions; choosing; choreography vs orchestration.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators