Skip to content

Check fails if bucket is empty #49

@charles-dyfis-net

Description

@charles-dyfis-net

When a bucket has no initial contents, this resource fails with the error:

jq: error (at <stdin>:1): Cannot iterate over null (null)

This is because in this scenario, aws s3api list-objects --query 'Contents[].{LastModified: LastModified}' returns null, and max_by(.LastModified) is not a valid jq query.

Acceptance Criteria

  • The check for an empty bucket should return an empty list of versions, rather than returning an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions