Skip to content

Instantly share code, notes, and snippets.

@thefotes
Created September 19, 2017 14:49
Show Gist options
  • Save thefotes/1468495b59d1c4e16133d7d86f94d52f to your computer and use it in GitHub Desktop.
Save thefotes/1468495b59d1c4e16133d7d86f94d52f to your computer and use it in GitHub Desktop.
Lambda function for configuring a step function iterator.
#!/usr/bin/env python3
def lambda_handler(event, context):
count = len(event['input_data']['items'])
index = -1
step = 1
items = event['input_data']['items']
return {'index': index, 'count': count, 'step': step, 'items': items}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment