Developers can use AWS Step Functions to design and execute workflows that connect services such as AWS Lambda, AWS Fargate, and Amazon SageMaker into a rich application. A workflow consists of a series of steps, with the output of one step being the input to the next step. Application development becomes more intuitive using the AWS Step Functions, allowing developers to configure each applications with chain of functions such as a AWS Lambda function, or a function on the container that is developed stateless as a set of states.

Today, we are announcing enhancements of AWS Step Functions with updates to Amazon States Language (ASL). ASL is a JSON-based structured language that defines state machines and collections of states that can perform work (Task states), determines which state to transition to next (Choice state), and stops execution on error (Fail state). Today’s updates allow customers to write simplified workflow applications, increase flexibility within the state machine definition, reduce lambda calls, and reduce state transitions to save money.

If you access the AWS Step Functions management console, you’ll see new code snippets under the definition step.

Updates to Choice State

Choice State basically adds branch logic to the state machine. This update adds several new operators and provides additional selection that allow operators to simplify existing definitions or add dynamic behavior within state machine definitions.

  1. Comparison Operator – supports a test for below values;

  2. IsNull – null

  3. IsString – string

  4. IsNumeric – numeric

  5. IsBoolean – boolean

  6. IsTimestamp – timestamp

  7. {

  8. "Variable": "$.foo",

  9. "IsNull|IsString|IsNumeric|IsBoolean|IsTimestamp": true|false

  10. }

  11. Existence Test – supports a test for the existence or non-existence of a particular field.

  12. {

  13. "Variable": "$.foo",

  14. "IsPresent": true|false

  15. }

  16. Wildcarding – supports shell “glob” style wildcards, so customers can test for log-*.txt or LATEST.

  17. {

  18. "Variable": "$.foo",

  19. "StringMatches": "log-*.txt"

  20. }

  21. Variable to Variable Comparison – allows for the comparison of an input field to another input field. Currently, the choice state allows for comparison to a fixed value.

  22. {

  23. "Variable": "$.foo",

  24. "StringEqualsPath": "$.bar"

  25. }

#application services #aws step functions #function

AWS Step Functions adds updates to ‘choice’ state
16.35 GEEK