AWS's orchestration service. A *StateMachine* is the key cloud resource which is deployed for a workflow in Step Functions. A StateMachine is described using [Amazon States Language (ASL)](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) which provides several task and control-flow declarative primitives. ## Pricing ### Standard Workflows ([source](https://aws.amazon.com/step-functions/pricing/)) - Free: 4,000 STATE TRANSITIONS per month - $0.025 per 1,000 state transitions thereafter START and END both count as state transitions. ## #OpenQuestions - **Is it possible to create an ASL file for a statemachine which is independent of environment-specific variables?** e.g. For tasks which write to DynamoDB tables, the table name is usually dynamically injected into the ASL at deploy time using something like Serverless Framework variables. This might be desirable as it makes development workflow easier (just copy and paste an ASL JSON/YML file between console and IDE, plus it should work independent of deployment framework) - Potential solution: all environment variables are supplied to the input argument by the client when execution is started, say under `event.environment` field. This is fine if all executions are launched from same Lambda say, but gets harder/impossible to manage if launched from multiple locations or from direct service integrations. - Potential solution: fetch environment variables in first state from [[AWS SSM Parameter Store]] and make them available to all subsequent states. However, this adds overhead to whole definition, is a potential point of latency and failure (requires IAM), and perhaps the SSM parameter prefix might need to be an environment-specific prefix anyway. - Ideal solution (not currently possible): AWS adds the concept of environment variables to a deployed StateMachine (settable via CloudFormation), independent of the `definition` field. ASL definition would then provide an intrinsic function to fetch the values of these environment vars ## See also - [[Testing Step Functions]] --- tags: #AWS, #AWSServices, #Orchestration