title: Aws lambda messes up my encoding
body: <p>I'm using</p>
  
  <p><a href="https://clifff.com/2015/10/01/2015-failed-experiments-with-aws-lambda/" rel="nofollow">https://clifff.com/2015/10/01/2015-failed-experiments-with-aws-lambda/</a>
  +
  <a href="https://www.twilio.com/blog/2015/09/build-your-own-ivr-with-aws-lambda-amazon-api-gateway-and-twilio.html" rel="nofollow">https://www.twilio.com/blog/2015/09/build-your-own-ivr-with-aws-lambda-amazon-api-gateway-and-twilio.html</a></p>
  
  <p>to create an image resizing service on aws lambda ... I solved the content-type issue the first article was stuck at, but encoding seems like a dead end ... any help would be greatly appreciated!</p>
  
  <p>ruby  </p>
  
  <pre><code>Base64.decode64("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")
  </code></pre>
  
  <p>-> working image</p>
  
  <pre><code>GIF89a\u0001\u0000\u0001\u0000\x80\u0000\u0000\u0000\u0000\u0000\xFF\xFF\xFF!\xF9\u0004\u0001\u0000\u0000\u0000\u0000,\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000\u0000\u0002\u0001D\u0000;
  </code></pre>
  
  <p>api gateway with </p>
  
  <pre><code>$util.base64Decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")
  </code></pre>
  
  <p>-> broken image</p>
  
  <pre><code>GIF89a\u0001\u0000\u0001\u0000�\u0000\u0000\u0000\u0000\u0000���!�\u0004\u0001\u0000\u0000\u0000\u0000,\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000\u0000\u0002\u0001D\u0000;
  </code></pre>