Skip to content

ListObjectVersions

Source: src/AWS/S3/ListObjectVersions.ts

Runtime binding for s3:ListBucketVersions.

Bind this operation to a bucket to get a callable that lists object versions and delete markers — the bucket name is injected automatically and s3:ListBucketVersions is granted on the bucket. Provide the implementation with Effect.provide(AWS.S3.ListObjectVersionsHttp).

const listObjectVersions = yield* AWS.S3.ListObjectVersions(bucket);
const result = yield* listObjectVersions({ Prefix: "reports/" });
const versions = result.Versions ?? [];