/AWS Step Functions & EventBridge
Concept Detail

AWS Step Functions & EventBridge

Difficulty: hard

Overview


AWS Step Functions orchestrates distributed workflows using state machines.

Workflow Types:

  • Standard: Max 1 year. Exactly-once. Auditable. Billed per state transition.
  • Express: Max 5 minutes. At-least-once. High throughput (100,000 TPS). Good for IoT/streaming.

State Types: Task, Choice, Wait, Parallel, Map, Pass, Succeed, Fail.

  • Map: Iterate over array, process in parallel.
  • Parallel: Execute multiple branches simultaneously.

Error Handling: Catch/Retry blocks with exponential backoff.

Activity Tasks: Wait for external process (human approval). SendTaskSuccess/SendTaskFailure to continue.


Amazon EventBridge routes events between AWS services, SaaS apps, and custom applications.

Key Concepts:

  • Event Bus: Default (AWS), Custom, Partner.
  • Rules: Match events, route to up to 5 targets.
  • Targets: Lambda, SQS, SNS, Step Functions, ECS, API Gateway.

Event Pattern Matching: Filter on source, detail-type, or any field. Supports prefix, suffix, numeric ranges.

EventBridge vs SNS: EventBridge: full payload filtering, schema registry, SaaS integration. SNS: simpler, message attribute filtering only.

Practice Linked Questions


easy

Q1. A developer builds a Step Functions workflow where Step B depends on Step A completing successfully, and Steps C and D can run simultaneously after Step B. Which state type should be used for Steps C and D?


Select one answer before revealing.

hard

Q2. A Step Functions Express Workflow must call an external payment API that takes up to 10 minutes to respond. The developer wants the workflow to wait for the API callback without polling. Which pattern should be used?


Select one answer before revealing.

medium

Q3. A developer uses Amazon EventBridge to trigger a Lambda function every day at 9 AM UTC. After deploying, the Lambda is not being triggered. The EventBridge rule shows the rule is enabled. What should the developer check first?


Select one answer before revealing.

medium

Q4. A developer wants to capture all changes to AWS API calls (e.g., S3 PutObject, EC2 StartInstances) across the account and route them to an SQS queue for compliance auditing. Which source should be used with EventBridge?


Select one answer before revealing.

medium

Q5. A Step Functions state machine processes a high-volume stream of e-commerce transactions (10,000+ per second). The developer needs low-latency execution and can tolerate at-most-once guarantees (no exactly-once semantics needed). Which workflow type should be used?


Select one answer before revealing.