Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

list all files in s3 bucket

// 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
}
Comment

s3 list files in bucket

def get_s3_keys(bucket):
    """Get a list of keys in an S3 bucket."""
    keys = []
    resp = s3.list_objects_v2(Bucket=bucket)
    for obj in resp['Contents']:
        keys.append(obj['Key'])
    return keys
Comment

PREVIOUS NEXT
Code Example
Javascript :: target url javascript 
Javascript :: get all entries in object as array hjs 
Javascript :: javascript async fetch file html 
Javascript :: performance.now() javascript 
Javascript :: how to edit website in browser using javascript on google chrome 
Javascript :: javascript add to array 
Javascript :: scroll event js 
Javascript :: javascript format price 
Javascript :: kamus bahasa inggris 
Javascript :: javascript get boolean if checkbox is checked 
Javascript :: nuxt router push 
Javascript :: javascript change hidden input value 
Javascript :: out of memory gc overhead limit exceeded. react native 
Javascript :: remove event listener jquery 
Javascript :: get random number node js 
Javascript :: button in vanilla js 
Javascript :: to add autofix when saving files in Eslint 
Javascript :: Program for factorial of a number in javascript 
Javascript :: queue en js 
Javascript :: capitalize first letter after character javascript 
Javascript :: Unable to resolve module react-native-permissions 
Javascript :: javascript class constructor 
Javascript :: get children jquery index 
Javascript :: object keys javascript 
Javascript :: mil to km javascript 
Javascript :: template string javascript 
Javascript :: get element ref react 
Javascript :: push characters to a string javascript 
Javascript :: how to remove duplicate array object in javascript 
Javascript :: Getting Binary gap in JS 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =