I am trying to upload a file in S3 using boto3.I tried below code.
import boto3
s3 = boto3.resource('s3')
buck_name = s3.create_bucket(Bucket='trubuckboto')
s3.Object('trubuckboto','tlearn.txt').upload_file(
Filename='G:\tlearn.txt')
My bucket creation is successfull but i am not able to upload file from location G:\tlearn.txt inside that bucket.Below is the error i am getting
return os.stat(filename).st_size OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'G:\tlearn.txt'
Can someone suggest what i am missing here ?