automatic_s3_uploader.py 417 B

1234567891011121314
  1. from secrets import access_key, secret_access_key
  2. import boto3
  3. import os
  4. client = boto3.client('s3',aws_access_key_id = access_key,
  5. aws_secret_access_key = secret_access_key)
  6. for file in os.listdir():
  7. if '.py' in file:
  8. upload_file_bucket = 'my-proj-bucket'
  9. upload_file_key = 'python/' +str(file)
  10. client.upload_file(file, upload_file_bucket, upload_file_key)