original_docstring: Upload a file to S3
      Parameters
      ----------
      results: string, required
          Name of the local file with intermediate results
      
docstring: Upload a file to S3
  Parameters
  
  string, required
  Name of the local file with intermediate results
docstring_tokens: Upload a file to S3 Parameters string required Name of the local file with intermediate results
code: def upload_intermediate_results(results):
      """Upload a file to S3
      Parameters
      ----------
      results: string, required
          Name of the local file with intermediate results
      """
  
      xray_recorder.begin_subsegment('## upload_intermediate_results')
      subsegment = xray_recorder.current_subsegment()
      subsegment.put_metadata('filename', f's3://{src_bucket}/lambda-etl-refarch/temp/{results}')
  
      results_path = os.path.join('/tmp', results)
      # upload to target S3 bucket
      try:
          response = s3.upload_file(
              results_path,
              output_bucket,
              'lambda-etl-refarch/temp/{}'.format(results))
          log.info(f"Uploaded intermediate results to s3://{output_bucket}/lambda-etl-refarch/temp/{results}")
          subsegment.put_annotation('INTERMEDITE_RESULTS_UPLOAD', 'SUCCESS')
      except botocore.exceptions.ClientError as e:
          subsegment.put_annotation('INTERMEDITE_RESULTS_UPLOAD', 'FAILURE')
          log.error(f'Unable to upload intermediate results: {results}')
          log.debug(e)
          raise
      xray_recorder.end_subsegment()
code_tokens: def upload_intermediate_results ( results ) : xray_recorder . begin_subsegment ( '## upload_intermediate_results' ) subsegment = xray_recorder . current_subsegment ( ) subsegment . put_metadata ( 'filename' , f's3://{src_bucket}/lambda-etl-refarch/temp/{results}' ) results_path = os . path . join ( '/tmp' , results ) try : response = s3 . upload_file ( results_path , output_bucket , 'lambda-etl-refarch/temp/{}' . format ( results ) ) log . info ( f"Uploaded intermediate results to s3://{output_bucket}/lambda-etl-refarch/temp/{results}" ) subsegment . put_annotation ( 'INTERMEDITE_RESULTS_UPLOAD' , 'SUCCESS' ) except botocore . exceptions . ClientError as e : subsegment . put_annotation ( 'INTERMEDITE_RESULTS_UPLOAD' , 'FAILURE' ) log . error ( f'Unable to upload intermediate results: {results}' ) log . debug ( e ) raise xray_recorder . end_subsegment ( )
short_docstring: Upload a file to S3
  Parameters
short_docstring_tokens: Upload a file to S3 Parameters
comment: """Upload a file to S3
      Parameters
      ----------
      results: string, required
          Name of the local file with intermediate results
      """$SEP$# upload to target S3 bucket