title: Move files from S3 to AWS EFS on the fly
body: <p>I am building an application where the user can upload images, for this I am using S3 as files storage.</p>
  <p>In other area of the application there is some process deployed on EC2 that need to use the uploaded images.
  This process need the images multiple times (it generate some report with it) and it's in part of multiple EC2 - using elastic beanstalk.</p>
  <p>The process doesn't need all the images at once, but need some subset of it every job it gets (depend the parameters it gets).</p>
  <p>Every ec2 instance is doing an independent job - they are not sharing file between them but they might need the same uploaded images.</p>
  <p>What I am doing now is to download all the images from s3 to the EC2 machine because it's need the files locally.
  I have read that EFS can be mounted to an EC2 and then I can access it like it was a local storage.</p>
  <p>I did not found any example of uploading directly to EFS with nodejs (or other lang) but I found a way to transfer file from S3 to EFS - &quot;DataSync&quot;.
  <a href="https://docs.aws.amazon.com/efs/latest/ug/transfer-data-to-efs.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/efs/latest/ug/transfer-data-to-efs.html</a></p>
  <p>So I have 3 questions about it:</p>
  <ol>
  <li>It is true that I can't upload directly to EFS from my application? (nodesjs + express)</li>
  <li>After I move files to EFS, will I able to use it exactly like it in the local storage of the ec2?</li>
  <li>Is it a good idea to move file from s3 to efs all the time or there is other solution to the problem I described?</li>
  </ol>