Skip to content

aws ec2 describe-snapshots: default timestamp returned is incompatible with API filters #8969

Open
@ghostis

Description

@ghostis

Describe the bug

When I run:

$ aws --profile profile_name ec2 --region us-east-1 describe-snapshots --filter Name=tag:infra-build,Values=2023Z | jq '.Snapshots[].StartTime'

I get:

"2023-10-03T15:31:24.241000+00:00"
"2023-10-02T08:31:10.302000+00:00", etc.

When I then run:

aws --profile profile_name ec2 --region us-east-1 describe-snapshots --filter Name=start-time,Values="2023-10-03T15:31:24.241000+00:00"

I get:

{
"Snapshots": []
}

I'm pretty sure this used to work.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

If I filter describe-snapshots with --filter Name=start-time using the time listed under "StartTime", I expect to get the snapshot with that specific StartTime.

Current Behavior

If I filter describe-snapshots with --filter Name=start-time using the time listed under "StartTime", I get:

{
"Snapshots": []
}

Reproduction Steps

When I run:

$ aws --profile profile_name ec2 --region us-east-1 describe-snapshots --filter Name=tag:infra-build,Values=2023Z | jq '.Snapshots[].StartTime'

I get:

"2023-10-03T15:31:24.241000+00:00"
"2023-10-02T08:31:10.302000+00:00", etc.

When I then run:

aws --profile profile_name ec2 --region us-east-1 describe-snapshots --filter Name=start-time,Values="2023-10-03T15:31:24.241000+00:00"

I get:

{
"Snapshots": []
}

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.18.3 Python/3.12.6 Linux/6.1.0-25-amd64 exe/x86_64.debian.12

Environment details (OS name and version, etc.)

Linux 6.1.0-25-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux, Debian version 12.7, updated yesterday.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.documentationThis is a problem with documentation.ec2p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions