'AWS Lambda step function Integration

I am calling a lambda from a step function and it waits for callback.(The lambda runs some python code which calls few other AWS services like batch jobs) Even though my lambda completed (batch job ran successfully),the step function is still waiting for call back. I am assuming once the lambda is executed,it automatically passes the task token to step function.I haven't written any code for manually returning the token. Please correct me If I am wrong and help.



Solution 1:[1]

For async jobs in aws you will have a describe function like this one. You can create a step function step that waits for some time and then triggers another lambda that will decide by the response of the describe boto3 (if python) if to run the waiter again or move to next, essentially creating a loop in the state machine. This is a good explanation of the idea: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 urirot