2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
Two possible solution that I can see are:
- Define
ResultSelector
in each state to insert the staticEndpointName
value into the state's result. Adding a value"Output.$": "$"
will copy the full, un-manipulated, state result into that key.
Example Definition
{
"StartAt": "InvokeEndpoint02",
"States":
{
"InvokeEndpoint02":
{
"Type": "Task",
"End": true,
"Parameters":
{
"Body": "$.Input",
"EndpointName": "dummy-endpoint-name2"
},
"Resource": "arn:aws:states:::aws-sdk:sagemakerruntime:invokeEndpoint",
"ResultSelector":
{
"Output.$": "$",
"EndpointName": "dummy-endpoint-name2"
}
}
}
}
Example Output
{
"EndpointName": "dummy-endpoint-name2",
"Output": {
"Body": "{xxxx}",
"ContentType": "application/json",
"InvokedProductionVariant": "xxxx"
}
}
- Pass the
EndpointName
into Amazon SageMaker'sCustomAttributes
Request/Response elements, SageMaker InvokeEndpoint Response Elements. AddingEndpointName
to the model's response in theCustomAttributes
element will result in the desired state result.
answered 3 years ago
0
2nd way from @Edward_S's answer does fulfill my needs. but, someone stumbling on this question in the future would want to learn how this can be accomplished.
I learned from AWS Support that it is not possible to access the parameters(or API Parameters) of a node.
If you want to access the Parameters, make a node(at i-1
th position) send the Parameters current node(at i
th position) need as Parameters and fill them dynamically and then access them from it's output.
answered 3 years ago
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago