Daftar AWS Semua File di S3 Bucket Node JS AWS
// Array of all keys in s3 bucket
const findKeys = async(bucketName)=>{
const {Contents} = await s3.listObjects({Bucket: bucketName}).promise()
const keysArr = []
for(const obj of Contents){
keysArr.push(obj.Key)
}
return keysArr
}
Ofir Salem