There is a particular format that works fine with python 3.x
Here is the way you can implement it.
import boto3
s3 = boto3.resource('s3')
s3.Bucket('aniketbucketpython').upload_file('C:\\Users\\aniket\\Desktop\\testdb1.json','%s/%s' %('aniketfolder2','testdb.json'))
Hope this is helpful!
To know more join Master in Python programming course today.
Thanks!