# Issue building locally on Mac architecture for AWS Linux

**URL:** <https://forum.serverless.com/t/issue-building-locally-on-mac-architecture-for-aws-linux/20201>\
**Category:** Serverless Architectures\
**Tags:** aws, lambda\
**Created:** [May 23, 2024, 1:47pm UTC](https://forum.serverless.com/t/issue-building-locally-on-mac-architecture-for-aws-linux/20201 "2024-05-23T13:47:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeromecovington](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jeromecovington/32/7914_2.png) [@jeromecovington](https://forum.serverless.com/u/jeromecovington)\
**Post date:** [May 23, 2024, 1:47pm UTC](https://forum.serverless.com/t/issue-building-locally-on-mac-architecture-for-aws-linux/20201/1 "2024-05-23T13:47:01Z")

</div>

I can run my lambda locally using `serverless offline` but if I build it locally with `yarn build` and then deploy using `serverless deploy` I encounter an error in my logs when requesting the endpoint. The error I see is:

“errorMessage”:“/var/task/node\_modules/sqlite3/build/Release/node\_sqlite3.node: invalid ELF header”

This I believe is due to running build on the Mac architecture and then deploying to the AWS Linux architecture, whereas the sqlite3 module needs to be installed on the AWS Linux architecture.

Is there a way to run the `yarn install` and `yarn build` on the AWS Linux architecture before deploying?

---

<div class="post-metadata">

**Author:** ![beenmeckel](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beenmeckel](https://forum.serverless.com/u/beenmeckel)\
**Post date:** [September 21, 2025, 5:43pm UTC](https://forum.serverless.com/t/issue-building-locally-on-mac-architecture-for-aws-linux/20201/2 "2025-09-21T17:43:31Z")

</div>

Especially when Apple themselves use off the shelf stuff internally. Why are all the rest of us denied the same privilege? It’s not like people aren’t willing to pay… Offer me VM licences for MacOS and I’ll buy immediately.

[192.168.100.1](https://1921681001.id/) [192.168.1.1](https://19216811.cam/)
