aws-step-functions-data-science-sdk-python
aws-step-functions-data-science-sdk-python copied to clipboard
Feature Request: Add support for ResultSelector
ResultPath is supported in the SDK, but the newer ResultSelector is not which is preferrable for Lambda functions which emit a bunch of metadata in addition to the JSON output result.
See docs
Anny chance this could be pushed through? Seems like the linked PR for this is almost ready?
@a13zen We're taking another look at the PR to get this shipped soon. Sorry for the delay!
Unfortunately I see that last activity here was a year ago, any chance this is getting implemented?
For anyone else coming here looking for a solution until this is implemented, I found a workaround that works for me. I put a Pass step after my lambda step and use the parameters field of the pass step the same way as you would use the ResultSelector on the output of my lambda step.
lambda_run_step = LambdaStep(
state_id="lambda_run_step",
parameters={
"FunctionName": "db_run_procedure",
"Payload": {
"name": "helloworld",
"schema": "dummy",
"database": "example"
}
}
)
lambda_run_output_step = Pass(
state_id="lambda_run_output_step ",
parameters = {
"lambda_run_result.$": "$.Payload"
}
)