title: Node Executable in AWS Lambda
body: <p>I am attempting to build an AWS Lambda (Node) function that utilizes the <a href="https://github.com/getsentry/sentry-cli" rel="nofollow noreferrer">Sentry CLI</a>. So far I have something like:</p>
  <pre><code>const CLI = require(&quot;@sentry/cli&quot;);
  
  const cli = new CLI(null, {
    org: '...',
    authToken: '...',
  });
  
  exports.handler = async (event) =&gt; {
    const response = await cli.execute([&quot;releases&quot;, &quot;list&quot;]);
  
    // ...create a release/deploy/etc...
  };
  </code></pre>
  <p>This however fails with:</p>
  <blockquote>
  <p>/var/task/node_modules/@sentry/cli/sentry-cli: cannot execute binary file</p>
  </blockquote>
  <p>There seems to have been a similar <a href="https://github.com/getsentry/sentry-cli/issues/747" rel="nofollow noreferrer">issue reported</a> and the suggestion is to change the permission of the executable.</p>
  <p>How can I ensure that the permissions on the executable are not stripped when zipping/uploading the function to AWS?</p>