Created
September 19, 2017 14:50
-
-
Save thefotes/eaab3d03fe249b7d03e60ab898baa13b to your computer and use it in GitHub Desktop.
Lambda function for iterating over a set of items as part of a step function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def lambda_handler(event, context): | |
iterator = event['iterator'] | |
index = iterator['index'] | |
step = iterator['step'] | |
count = iterator['count'] | |
items = iterator['items'] | |
index += step | |
return {'index': index, 'step': step, 'count': count, 'continue': index < count, 'items': items } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment