Skip to content

Commit 3ae8421

Browse files
authored
docs: add Windows line ending and permissions caveat for Zip packages (#611) (#640)
1 parent 1fcef19 commit 3ae8421

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/guide/src/getting-started/zip-packages.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,13 @@ Resources:
4949
AWS_LWA_PORT: 7000
5050
```
5151
52+
## Windows Users
53+
54+
If you create your Zip package on Windows, your startup script (e.g. `run.sh`) must meet two requirements to work in the Lambda Linux runtime:
55+
56+
1. **Use LF line endings** — Windows defaults to CRLF (`\r\n`), which causes `/bin/sh` to fail with `cannot execute: required file not found`.
57+
2. **Set Unix file permissions to 755** — Zip files created on Windows don't preserve Unix execute permissions.
58+
59+
Most zip utilities on Windows don't handle Unix permissions. You can work around this by using WSL, a build script that sets permissions explicitly, or a tool like `7-Zip` with the `-mcu` flag. See [#611](https://github.com/awslabs/aws-lambda-web-adapter/issues/611) for more details.
60+
5261
For a complete working example, see the [Express.js in Zip](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/expressjs-zip) example.

0 commit comments

Comments
 (0)