Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Support DescribeExection for Express Step Functions #796

Closed
2 tasks
Elevating7734 opened this issue Jul 18, 2024 · 6 comments
Closed
2 tasks

Support DescribeExection for Express Step Functions #796

Elevating7734 opened this issue Jul 18, 2024 · 6 comments
Assignees
Labels
feature-request New feature or request p2 service-api This issue pertains to the AWS API stepfunctions

Comments

@Elevating7734
Copy link

Describe the feature

The CLI should support polling an execution for status

Use Case

An express step function can be triggered via the CLI, but the status cannot be checked. This reduces confidence in the solution, as I need the ability to poll whether the execution has been completed or failed.

Ex:

> aws stepfunctions start-execution --state-machine-arn <REDACTED>
{
    "executionArn": "<REDACTED>",
    "startDate": "2024-07-18T11:44:22.561000-07:00"
}

Proposed Solution

Add CLI and/or API functionality to poll an express state machine for the status.

Ex: aws stepfunctions get-execution-history --execution-arn <ARN>

Other Information

Duplicates older issue, raised by another user and closed for inactivity aws/aws-cli#7476

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

aws-cli/2.17.13 Python/3.11.9 Windows/10 exe/AMD64

Environment details (OS name and version, etc.)

Microsoft Windows 11 Pro / 10.0.22631 Build 22631

@tim-finnigan
Copy link
Contributor

Hi @Elevating7734 thanks for reaching out. The describe-executions command involves a call to the Step Functions DescribeExecution API. The documentation for both notes:

Executions of an EXPRESS state machine aren't supported by DescribeExecution unless a Map Run dispatched them.

So to clarify, are you requesting that the DescribeExecution API (and by association the CLI command) should support executions of an EXPRESS state machine in cases where they were not dispatched by a Map Run? If so then we would need to reach out to the Step Function teams for feedback on this request, as they own and maintain the underlying API. (This may just be a limitation of Standard vs Express Workflows but they should be able to provide more insight...)

Another question since you mentioned polling — several services have wait commands (for example ec2) which allow for polling. So are you requesting a waiter model for this use case as well? We have received a similar request in the past (#119). The Step Functions team added it to their backlog but did not prioritize it. However, they did recommend using EventBridge integrations as an alternative: https://docs.aws.amazon.com/step-functions/latest/dg/cw-events.html

@tim-finnigan tim-finnigan added service-api This issue pertains to the AWS API p2 stepfunctions response-requested This issue requires a response to continue and removed investigating needs-triage labels Jul 19, 2024
Copy link

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will be closed soon label Jul 30, 2024
@Elevating7734
Copy link
Author

are you requesting that the DescribeExecution API (and by association the CLI command) should support executions of an EXPRESS state machine in cases where they were not dispatched by a Map Run?

Ideally, yes. The mechanism is less important than the ability to check if an invocation is completed or failed for some reason. I hadn't thought of the EventBridge workaround, but ideally I could poll the state of the EXPRESS state machine directly to determine if the run has been completed.

@github-actions github-actions bot removed closing-soon This issue will be closed soon response-requested This issue requires a response to continue labels Jul 30, 2024
@tim-finnigan
Copy link
Contributor

tim-finnigan commented Aug 2, 2024

Thanks for confirming — I'll transfer this to our cross-SDK repository (since APIs like this one are used across AWS SDKs) and try reaching out to the Step Functions team for feedback on this feature request. (ref: P145888617)

@tim-finnigan tim-finnigan transferred this issue from aws/aws-cli Aug 2, 2024
@tim-finnigan
Copy link
Contributor

We heard back from the Step Functions team, who noted that express state machine execution history is not recorded in Step Functions by design — they rely on CloudWatch logs and customers should be able to retrieve them from the CloudWatch group.

If you enable CloudWatch config in the state machine, you can pull the execution status with the CloudWatch FilterLogEvents API.

You can refer to the documentation here for the difference between standard and execution:
https://docs.aws.amazon.com/step-functions/latest/dg/diff-standard-express-exec-details-ui.html

So the service team does not plan to change this behavior, but if you'd like me to forward any additional information regarding your use case to them please let me know.

@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or request p2 service-api This issue pertains to the AWS API stepfunctions
Projects
None yet
Development

No branches or pull requests

2 participants