- Newest
- Most votes
- Most comments
I realized that “Pass” does not wait for the event & it directly passes the empty object to the next step. Also, Crawler does not support TaskToken in the "wait for token" integration pattern (unlike Lambda integration)
So, I had to use this approach: https://aws.amazon.com/blogs/compute/orchestrating-aws-glue-crawlers-using-aws-step-functions/
The issue you're facing is due to the way AWS Step Functions handles input from EventBridge events. By default, Step Functions expects the event payload to be wrapped in a detail object. However, in your case, the event payload is not wrapped, which is why you're seeing an empty object in the Pass state.
To resolve this issue, you can use the InputPath parameter in the Pass state to access the correct event payload. Here's how you can modify the wait-for-crawler-completion state:
"wait-for-crawler-completion": { "Type": "Pass", "ResultPath": null, "InputPath": "$.detail", "Next": "check-crawler-state" }
By setting InputPath to $.detail, you're instructing Step Functions to look for the event payload within the detail object, which is how EventBridge events are structured.
Additionally, you might need to adjust the check-crawler-state state to access the correct property from the event payload. For example, if the status property is nested within the detail object, you would need to use the following expression:
"check-crawler-state": { "Type": "Choice", "Choices": [ { "Variable": "$.detail.state", "StringEquals": "SUCCEEDED", "Next": "start-transform-glue-job" } ], "Default": "crawler-failed" }
In this example, $.detail.state is used to access the state property from the event payload, assuming it's nested within the detail object.
Relevant content
- AWS OFFICIALUpdated 2 years ago

Thanks, unfortunately this didn't work either.