Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

boto3 client python

import boto3

# Let's use Amazon S3
client = boto3.client('s3',
  aws_access_key_id='Your_Access_Key_ID',
  aws_secret_access_key='You_Secret access_key',
  region_name='Region_Name'
)
    
# Upload a new file
client.upload_file('test.jpg', 'bucket_name', 'test.jpg')
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 :: get the current date and time in python 
Python :: print 2 decimal places python 
Python :: pandas df to mongodb 
Python :: sciket learn imputer code 
Python :: find duplicated entries present in a list 
Python :: set type of column pandas 
Python :: iterate over dictionary django 
Python :: python find equal rows of two numpy arrays 
Python :: how to convert a list to dataframe in python 
Python :: python find largest variable 
Python :: python insert sorted list 
Python :: python named group regex example 
Python :: open word from python 
Python :: seaborn and matplotlib Setting the xlim and ylim python 
Python :: python bit shift by 3 
Python :: python dictionary get 
Python :: deleting models with sqlalchemy orm 
Python :: scikit learn pca 
Python :: read json in python 
Python :: python invert binary tree 
Python :: add caption to plot python 
Python :: python json check if key exists 
Python :: python write text file on the next line 
Python :: python extract zip file 
Python :: increase axis ticks pyplot 
Python :: python opencv subtract two images 
Python :: python3 shebang line 
Python :: python code with sigma 
Python :: how to create a variable in python 
Python :: python thread function 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =