Chesong
Chesong3w ago

[Typescript BUN]: Listing all objects within S3 Bucket

I am trying to get a list of all ".pngs" within a s3 bucket folder which then feeds the dropdown selector we have on Windmill. Right now it's hardcoded where we have a background runnable and a mapping like this. I have already connected the resource and am able to get region, bucketname, etc using
await wmill.getResource('u/path/brisk_s3_aws_oidc')
await wmill.getResource('u/path/brisk_s3_aws_oidc')
but I am unsure how to get all the images listed under a certain directory
const iconToUrlMapping = {
"image1": "https://cdn.s3.amazonaws.com/images/icons/image1.png",
"image2": "https://cdn.s3.amazonaws.com/images/icons/image2.png",
};
const iconToUrlMapping = {
"image1": "https://cdn.s3.amazonaws.com/images/icons/image1.png",
"image2": "https://cdn.s3.amazonaws.com/images/icons/image2.png",
};
Note: We use the enterprise version of Windmill.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?