title: How can I upload the csv files from Lambda to an S3 bucket? "[ERROR] KeyError: 'Records' and my lambda function is also not getting triggered by s3
body: <p>I extracted an Excel file with multiple sheets from S3 and I am turning each sheet  into csv format and doing a simple cleansing before uploading it to another S3 bucket.</p>
  
  <p>This is my code so far for my Lambda function but I have no idea how to upload the csv file for each sheet to S3.</p>
  
  <p>Also I want to change the empty cells in the excel files with <code>Nan</code> but I don't know how.</p>
  
  <p>Update: I tried the solution from the answer below. I am getting "errorMessage": "'Records'", "errorType": "KeyError". My lambda function is also not getting triggered by s3.</p>