Skip to content

Step Function DescribeExecution startDate format documentation mismatch

0

The CLI and API docs indicate that this should return a number:

And on v1 of the CLI, they do:

$ aws stepfunctions describe-execution --execution-arn "$ARN" --query startDate --output text --region us-west-2
1762544225.545
$ aws --version
aws-cli/1.29.47 Python/3.10.12 Linux/6.14.0-1015-aws botocore/1.31.47

But on CLI version 2, they return a isoformat date string:

$ aws stepfunctions describe-execution --execution-arn "$ARN" --query startDate --output text --region us-west-2
2025-11-07T11:37:05.545000-08:00
$ aws --version
aws-cli/2.9.0 Python/3.9.11 Darwin/23.4.0 exe/x86_64 prompt/off

What is the intended behavior here?

asked 9 months ago124 views

2 Answers
0
Accepted Answer

The discrepancy you're observing between AWS CLI v1 and v2 for the startDate field in the describe-execution response is due to how each CLI version handles timestamp data.

In the AWS Step Functions API documentation, the startDate field is defined as a Timestamp type. AWS CLI v1 returns this as a Unix epoch timestamp (a number representing seconds since January 1, 1970), while AWS CLI v2 automatically converts this timestamp to a more human-readable ISO 8601 format string.

This difference in representation is part of the improvements made in AWS CLI v2, which provides more user-friendly formatting of date/time values by default. The underlying data is the same, just presented differently.

Both formats are valid representations of the same timestamp data. The intended behavior is that the API returns timestamp data, and the CLI versions format this data according to their respective implementations. If you need consistent formatting across CLI versions, you can use additional formatting options or parsing in your scripts to handle the timestamp in your preferred format.
Sources
DescribeMapRun - AWS Step Functions
ExecutionListItem - AWS Step Functions
DescribeExecution - AWS Step Functions

answered 9 months ago

AWS
EXPERT

reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.