aws-sam-cli
aws-sam-cli copied to clipboard
Binary execution issues in SAM CLI container due to read-only file system
We've encountered a recent change in behavior when executing binaries within the SAM CLI container environment. Previously, we were able to execute a binary from within our project's directory hierarchy without issue. However, we're now experiencing a "read-only file system" error which prevents the binary from running unless it is placed in the /tmp
directory.
This change is significantly impacting our development workflow. Moving the binary to /tmp
requires us to rebuild the container on every code change, rather than just updating the code and re-invoking the lambda, which was possible before.
Steps to reproduce
- Place a binary file in the project directory.
- Using the a default template.yaml
- Attempt to execute that binary from within a Lambda function running in the SAM CLI container (sam local start-api).
- Observe the "read-only file system" error that prevents execution ([Errno 2] No such file or directory:).
Observed result
The binary cannot execute unless it's placed in /tmp
, due to the read-only file system error.
Expected result
The binary should be executable within the project directory hierarchy, as it was previously.
Currently our workaround is to create a dockerfile with the binary copied to /tmp and it works but as i wrote each code change requires building and its slowing the work
Thank you for your support.