def put_file(client, source_file, destination_file):
try:<EOL><INDENT>sftp_client = client.open_sftp()<EOL>sftp_client.put(source_file, destination_file)<EOL><DEDENT>except Exception as error:<EOL><INDENT>raise IpaUtilsException(<EOL>'<STR_LIT>'.format(error)<EOL>)<EOL><DEDENT>finally:<EOL><INDENT>with ignored(Exception):<EOL><INDENT>sftp_client.close()<EOL><DEDENT><DEDENT>
Copy file to instance using Paramiko client connection.