title: Babel transpile to ES6 for use with AWS Lambda
body: <p>I want to "transpile" my node 8 code to node 6.10 so it will run on AWS Lambda, and I'm following the tutorial here:</p>
  
  <p><a href="https://medium.com/@tomokazukozuma/how-to-transpile-es6-and-use-it-with-aws-lambda-78da3d7aefe3" rel="nofollow noreferrer">https://medium.com/@tomokazukozuma/how-to-transpile-es6-and-use-it-with-aws-lambda-78da3d7aefe3</a></p>
  
  <p>Everything seems to work, my .babelrc looks like:</p>
  
  <pre><code>{
      "presets": [
          [
              "env", {
                  "targets": {
                      "node": "current"
                  }
              }
          ]
      ]
  }
  </code></pre>
  
  <p>So now I run babel script -d dist
  It says:</p>
  
  <p>script\handler.js -> dist\handler.js</p>
  
  <p>But when I take a look at dst/handler.js (Windows 10 in case it matters) the code has changed somewhat but it's clearly not going to run on Lambda, my async/awaits are all still there. How can I get code that runs on Lambda out of babel?</p>