19 lines
464 B
Python
Executable File
19 lines
464 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import boto3
|
|
import json, argparse
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("files", help = "File(s) to upload", nargs = '+')
|
|
parser.parse_args()
|
|
|
|
cfg = json.load(open("config.json")) # TODO: support for ~/.aws/credentials, command line options
|
|
|
|
s3 = boto3.resource(
|
|
's3',
|
|
endpoint_url = "https://s3.wasabisys.com", #us-east-1
|
|
aws_access_key_id = cfg['access_key_id'],
|
|
aws_secret_access_key = cfg['secret_access_key']
|
|
)
|
|
|