parameters: (file_name, bucket, object_name=None)
return_statement: return True
docstring: Upload a file to an S3 bucket
  
      :param file_name: File to upload
      :param bucket: Bucket to upload to
      :param object_name: S3 object name. If not specified then same as file_name
      :return: True if file was uploaded, else False
docstring_summary: Upload a file to an S3 bucket
docstring_tokens: Upload a file to an S3 bucket
function: def upload_file(file_name, bucket, object_name=None):
      """Upload a file to an S3 bucket
  
      :param file_name: File to upload
      :param bucket: Bucket to upload to
      :param object_name: S3 object name. If not specified then same as file_name
      :return: True if file was uploaded, else False
      """
  
      # If S3 object_name was not specified, use file_name
      if object_name is None:
          object_name = file_name
  
      # Upload the file
      s3_client = s3
      try:
          response = s3_client.upload_file(file_name, bucket, object_name)
      except botocore.exceptions.ClientError as e:
          logging.error(e)
          return False
      return True
function_tokens: def upload_file ( file_name , bucket , object_name = None ) : # If S3 object_name was not specified, use file_name if object_name is None : object_name = file_name # Upload the file s3_client = s3 try : response = s3_client . upload_file ( file_name , bucket , object_name ) except botocore . exceptions . ClientError as e : logging . error ( e ) return False return True