Here is my code for upload a file to S3 bucket sing boto3 in python. 

```
import boto3

def upload_to_s3(backupFile, s3Bucket, bucket_directory, file_format):
    s3 = boto3.resource('s3')
    s3.meta.client.upload_file(backupFile, s3Bucket, bucket_directory.format(file_format))

upload_to_s3('/tmp/backup.py', 'bsfbackup', 'pfsense/{}', 'hello.py')

```

My question is about, I want to print the "Upload success" once the upload is succeeded, and print "Upload is failed" and the error stack if the uploading is failed.
Any help ?

Thanks.