Everything with my code works. The only pitfall I am currently facing is that I cannot specify the folder within the S3 bucket that I would like to place my file in. Here is what I have:
s3.meta.client.upload_file('/tmp/'+filename, '<bucket-name>', filename)
I have tried both:
s3.meta.client.upload_file('/tmp/'+filename, '<bucket-name>/folder/', filename)
and:
s3.meta.client.upload_file('/tmp/'+filename, '<bucket-name>', '/folder/'+filename)
if anyone has any tips on how to direct this to a specific folder (if this is possible) please let me know!
You do not need to pass the Key value as an absolute path. The following should work:
upload_file('/tmp/' + filename, '<bucket-name>', 'folder/{}'.format(filename))