You can use method of creating object instance to upload the file from your local machine to AWS S3 bucket in Python using boto3 library.
Here is the code I used for doing this:
s3 = boto3.resource('s3')
Hope it helps!
If you need to know more about Python, It's recommended to join Python course today.