Skip to content
Snippets Groups Projects
aws_push.py 287 B
Newer Older
  • Learn to ignore specific revisions
  • import boto3
    import sys
    import os
    
    filename = sys.argv[1]
    
    s3_client = boto3.client('s3')
    try:
    
        response = s3_client.upload_file("/" + filename, os.getenv('bucket'),
                                         filename)
    
        print('Error uploading to s3')
        print(e)