I’ve implemented an EXPRESS state machine and I’m attempting to retrieve the list of executions of a state machine. Below is my code snippet:
const stepFunction = new SFN({ region: REGION });
const listExecutionsInput = {
stateMachineArn: STATE_MACHINE_ARN,
statusFilter: ExecutionStatus.RUNNING,
};
const runningStateMachines = await stepFunction.listExecutions(listExecutionsInput);
However, it throws the following error:
{
message: 'This operation is not supported by this type of state machine',
error: {
name: 'StateMachineTypeNotSupported',
$fault: 'client',
$metadata: {
httpStatusCode: 400,
requestId: 'ciefq5881-6713-4662-b8fe-e0ddqa9ef4d1',
attempts: 1,
totalRetryDelay: 0,
},
__type: 'com.amazonaws.swf.service.v2.model#StateMachineTypeNotSupported',
},
platform: 'Unknown',
releaseId: 'Unknown',
incomingHttpRequest: {},
fatal: true,
}
Upon further investigation, I discovered that the listExecutions API action is not supported by EXPRESS state machines. I’m wondering if there’s an alternative API action that can provide at least the names of recent executions. Could you please advise?
For more context, you can refer to the documentation: https://docs.aws.amazon.com/step-functions/latest/apireference/API_ListExecutions.html
Ibrahim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.