Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

boto3.resource python

import boto3

s3 = boto3.resource('s3')
bucket = s3.Bucket('mybucket')
for obj in bucket.objects.all():
    print(obj.key, obj.last_modified)
Comment

boto3.client python

import boto3

client = boto3.client('s3')
response = client.list_objects_v2(Bucket='mybucket')
for content in response['Contents']:
    obj_dict = client.get_object(Bucket='mybucket', Key=content['Key'])
    print(content['Key'], obj_dict['LastModified'])
Comment

PREVIOUS NEXT
Code Example
Python :: import ndimage 
Python :: python 1 line for loop with else 
Python :: how to make text change lines pygame 
Python :: install pythonjsonlogger 
Python :: django password field 
Python :: python remove blanks from string 
Python :: how to use input in python 
Python :: save turtle programming python 
Python :: how to add extra zeros after decimal in python 
Python :: udp socket python 
Python :: negative number factor python 
Python :: huggingface dataset from pandas 
Python :: python text color 
Python :: add image pptx python 
Python :: FIND MISSING NUMBER IN AN ARRAY IN PYTHON 
Python :: count elements in columns pandas 
Python :: python numpy array 
Python :: maximum and minimum value of array python 
Python :: how to download a project from pythonanywhere 
Python :: filter a pandas dataframe by length of list in a column 
Python :: how to install python pyautogui 
Python :: tkinter button relief options 
Python :: rps python 
Python :: how to check a phone number is valid in python 
Python :: merge two columns pandas 
Python :: concatenate two tensors pytorch 
Python :: create new column with length of old column value python 
Python :: multiprocessing join python 
Python :: how to print specific part of a dictionary in python 
Python :: python get local ipv4 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =