title: S3 download - SDK vs HTTP request inside lambda function
body: <p>I'm looking for some benchmark or article explaining what is faster.</p>
  
  <p><strong>Inside a lambda function</strong>, is it faster to....:</p>
  
  <p>A) Download an S3 file through cloudfront with a regular request module (i.e. hit the cloudfront URL with request or axios and download it)</p>
  
  <p>B) Use the AWS SDK to get the file through the getObject methods</p>
  
  <p>I've been googling this for a while now and I don't quite get to the answer, and I'm hoping I can skip benchmark it if someone else did already.</p>
  
  <p>I'm talking about pretty small files, like fonts or images.</p>
  
  <p>And the root of the question is, I believe AWS uses some sort of backbone communication for some cases. Given that lambda is inside their system, as S3 is, maybe requesting the image through the internet (HTTP) is not that fast.</p>
  
  <p>Thanks!</p>