title: Transfer file from AWS S3 to OneDrive with AWS Lambda
body: <p>A client of ours requested that we have copies of their files on both <em>AWS S3</em> and <em>OneDrive</em>.</p>
  
  <p>The usual MO: File is sent from an iOS application to an <em>AWS S3</em> bucket. This triggers an <em>AWS Lambda Function</em> which attaches the file to an email and sends a copy to the client, which they again store on <em>OneDrive</em>.  Now, we want to skip the email part and transfer the file directly to <em>OneDrive</em>.</p>
  
  <p>All my research so far points to <em>Zapier</em> or <em>CloudRail</em> or <em>MS Graph REST Api</em>.  The problem I'm having is that we want to transfer the file with an <em>AWS Lambda function</em> (Java8), automagically.  Almost all the tutorials and examples on <em>MS Graph</em> needs a client to log in manually.  Mostly client side logic.  The other methods have more overhead, and we don't (unnecessarily) want to make our stack more complicated than it already is.</p>
  
  <p>I realize this is a very specific case. We are systematically replacing the client's file management system, without disrupting their day-to-day operations too much.</p>
  
  <p>Any conclusive pointers/examples/tutorials to get this done server side would be greatly appreciated.</p>