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 :: python create random mac 
Python :: python solve linear equation system 
Python :: how to check if a variable holds a class reference in python 
Python :: how to check if string is in byte formate pythin 
Python :: Local to ISO 8601: 
Python :: matrix diagonal sum leetcode in Python 
Python :: # enumerate 
Python :: Disctionary to Array 
Python :: django change settings at runtime 
Python :: uninstall every package in environment 
Python :: get first element of tuple python 
Python :: function in the input function python 
Python :: sort 2 lists together python 
Python :: python argparser flags 
Python :: python captcha bypass 
Python :: django unique validator 
Python :: python -c 
Python :: join tuple to string python 
Python :: python binary 
Python :: dataframe multiindex 
Python :: Concat Sort codechef solution 
Python :: python remove a character from a string 
Python :: python string encode 
Python :: python check if ip is up or down 
Python :: data type array 
Python :: installing intel python 
Python :: how to sort the order in multiple index pandas 
Python :: convert int to string python 
Python :: python get type of variable 
Python :: python regex find 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =