AWS
DevOps
  • knowledge
    • glossary
    • network knowledge
      • CIDR Block
      • OSI
      • List of Ports
      • Network model
    • AWS best practices
      • Least privilege principle
      • Support Plan
      • Well-architected framework
        • Well-architected framework
        • Cost optimization
        • Operational Excellence
        • Performance efficiency
        • Reliability
        • Security
    • Exams
      • DOP-C02
        • DOP-C02 topics
        • DOP-C02 Labs
      • DVA-C02
      • SOA-C02
  • services
    • access management
      • Directory Service
      • IAM
        • PassRole
      • IAM Identity Center (SSO)
      • Organizations
        • Organizational Unit
        • Control Tower
      • AD Domain Service
    • analytics
      • data analytic
        • Athena
        • QuickSight
        • Redshift
      • data collection
        • Data Lake
        • Lake Formation
      • data processing
        • EMR
        • Kinesis
        • Glue
          • Glue Data Catalog
      • OpenSearch
    • compute
      • Batch
      • EC2
        • Auto Scaling
        • AMI
        • ELB
          • Global accelerator
        • Security Group
        • EBS
        • EC2 Instance Store
        • Spot Fleet
      • Elastic Beanstalk
      • Lambda
        • Layer
        • Lambda API
      • Outposts
      • Wavelength
      • SAM
      • VMWare Cloud
    • container
      • Copilot
      • ECR
      • ECS
        • ECS Anywhere
      • EKS
        • EKS Anywhere
        • EKS Distro
      • Fargate
    • cost management
      • Budgets
      • Cost Explorer
      • Saving Plans
      • Compute Optimizer
    • database
      • Data Engineer
      • Document DB
      • DynamoDB
        • DynamoDB API
        • Scan
      • ElastiCache
      • Keyspaces
      • MemoryDB for Redis
      • Neptune
      • Quantum Ledger Database
      • RDS
        • Aurora
          • Aurora Global Database
          • Aurora Serverless
      • Timestream
    • devTools
      • CICD
        • CodeArtifact
        • CodeCommit
        • CodeBuild
        • CodeDeploy
        • CodePipeline
      • CloudFormation
      • CodeGuru
      • CodeStar
      • CodeWhisperer
      • X-Ray
      • Deployment strategies
    • finance
      • Cost explorer
    • integration
      • AppFlow
      • AppSync
      • EventBridge
      • MQ
      • SNS
      • SQS
      • Step Functions
      • SWF
    • management
      • AppConfig
      • AWS Backup
      • AWS CDK
      • Config
      • Grafana
      • Health Dashboard
      • Proton
      • Service Catalog
      • System Manager
      • SSM
      • Resource Group
      • OpsWorks (discontinued)
    • media
      • Elemental MediaConvert
      • Transcoder
    • messaging
      • SES
    • migration
      • Application Migration Service
      • DataSync
      • DMS
      • Migration Evaluator
      • Migration Hub
      • Server Migration Service
      • Snow Family
      • Transfer Family
    • ML
      • Comprehend
      • Forecast
      • Kendra
      • Lex
      • Rekognition
      • SageMaker
        • SageMaker Data Wrangler
        • SageMaker ML Lineage Tracking
    • monitoring
      • CloudTrail
      • CloudWatch
      • TrustedAdvisor
    • networking
      • CloudFront
      • Customer gateway
      • Edge Location
      • hybrid networking
        • Direct Connect
          • Direct Connect Gateway
        • Site-to-site VPN
      • PrivateLink
      • Region
        • AZ
      • Route 53
      • Transit Gateway
      • VPC
        • VPC Lattice
        • Subnet
          • NACL
        • Internet Gateway
        • Network Firewall
        • VPN
        • NAT Gateway
      • Virtual Private Gateway
    • security
      • Artifact
      • ACM
      • CloudHSM
      • Cognito
      • Detective
      • Firewall Manager
      • GuardDuty
      • Inspector
      • KMS
      • Macie
      • Network Firewall
      • Resource Access Manager
      • Security Hub
      • Secret Manager
      • Secret Hub
      • Shield
      • STS
      • Trusted Advisor
      • WAF
    • storage
      • Backup
      • EBS
      • EFS
      • FSx
      • S3
        • S3 Glacier
        • S3 Snippet
        • S3 Mountpoint
      • Snow family
      • Storage gateway
      • WorkDocs
    • web & mobile
      • Amplify
      • API Gateway
      • Device Farm
      • Pinpoint
Powered by GitBook
On this page
  • Overview
  • Features
  • Workflow configuration
  • Built-in service primitives
  • AWS service integration
  • Coordination of distributed apps
  • Components reuse
  • Built-in error handling
  • History execution
  • Cost
  • Concepts
  • HeartbeatSeconds vs Wait State:
  1. services
  2. integration

Step Functions

coordination, orchestration for distributed applications

PreviousSQSNextSWF

Last updated 12 months ago

| |

Overview

  • Similar to Microsoft Power Automate. A GUI workflow.

  • Help build visual workflow to translate business requirements to technical requirements.

  • Build apps fast, manage logic with low-code.

  • Built-in try/catch, retry, rollback.

  • Keywords: orchestration

Features

Workflow configuration

Built-in service primitives

AWS service integration

  • Lambda, ECS, Fargate

  • DynamoDB

  • SNS, SQS

  • AWS Batch, AWS Glue

  • SageMaker

Coordination of distributed apps

Can make http connection between app hosted on EC2, on-premises, mobile devices.

Components reuse

Built-in error handling

  • Retry failed or time-out tasks.

  • Response differently depend on type of error.

History execution

Cost

Pay for each state transition.

Concepts

  • Amazon State Language: is a JSON-based, structure language use to define state machine.

  • "Type": "Parallel" use to create parallel branches state machine.

  • Task: is a single unit of work and choice.

  • State: a step in the workflow

    • Pass state: debugging (just pass the input to its output, or inject some fixed data)

    • Task state: do some works in your state machine. eg.Lambda

    • Choice state: if-else statement

    • Wait state: delay for a certain amount of time

    • Success state: stop & mark as success

    • Fail state: stop & mark as failure.

    • Parallel state: create parallel branches of the same input

    • Map state: as LOOP statement (execute the same step for multiple entries)

  • HeartbeatSeconds: maximum interval that the task will wait for a hearbeat signal. If an activity worker fails to send heartbeats within this interval, the state is failed. A retry policy on the state allows another activity worker to attempt to complete the state.

HeartbeatSeconds vs Wait State:

  • HeartbeatSeconds: This is a parameter used within a Task state to specify the maximum interval the task will wait for a heartbeat signal. If no heartbeat is received within this interval, the task is marked as failed and can retry based on a defined policy.

  • Wait State: This is a state type used to introduce a deliberate delay in the execution of a state machine for a specified amount of time before transitioning to the next state. It is useful for adding pauses or delays in the workflow.

In essence, HeartbeatSeconds is about keeping a Task alive, while Wait state is about intentionally pausing the workflow.

Document
Workshop