Search... Ctrl + K

List objects in a bucket (s3)
One script reply has been approved by the moderators Verified

Created by admin 116 days ago Used 36 times 0 Points

List all objects in a bucket and return them as a list

No comments yet

Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.30.0/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/mod.ts";

export async function main(s3: wmill.Resource<"s3">, prefix: string = "") {
  const s3client = new S3Client(s3);

  return s3client.listObjects({ prefix });
}

Submitted by admin 116 days ago

Edited 116 days ago

No comments yet