Stateless roundrobin

Selects the next array item in round robin fashion using the Step Functions execution count modulo of the array length.

The Step Functions `SDK:ListExecutions` task retrieves the total number of successful executions, and passes this onto a Lambda function that finds the remainder when divided by an array length (the modulo).
This workflow pattern Is used in production to assign new serverlessLand pattern pull requests to the DA team via Asana.

Launch Stack
< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/stateless-roundrobin/cd step-functions-workflows-collection/stateless-roundrobin/

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Benjamin Smith

Benjamin Smith

Ben is a senior developer advocate for Serverless Applications at Amazon Web Services based in London, UK. Prior to joining AWS Ben worked in a number of different technical roles specializing in workflow Automation and web development.

Follow on LinkedIn