Runtime.ExitError: Cannot create directory ‘/var/task/var’: Read-only file system
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the /var/task/bootstrap entry point and the hello_world_lambda.ex example, then reproduce the aws lambda invoke command while reviewing the logged startup commands. Trace which startup step attempts to create /var/task/var; done means the runtime can be invoked without the read-only filesystem error and the function reaches its normal response path.
Written by the indexing model from the issue text.
Description
I've deployed this to Lambda, but I get an error when invoking the function.
It looks like the issue is mkdir. How can I change the path.
CloudWatch
START RequestId: aa29cf83-7b5f-47a4-947d-4f3db5fdf179 Version: $LATEST
++ dirname /var/task/bootstrap
+ BASE=/var/task
+ EXE=/var/task/bin/hello_world_lambda
+ HOME=/tmp
+ export HOME
+ export RELEASE_READ_ONLY=true
+ RELEASE_READ_ONLY=true
+ export LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ /var/task/bin/hello_world_lambda foreground
mkdir: cannot create directory ‘/var/task/var’: Read-only file system
END RequestId: aa29cf83-7b5f-47a4-947d-4f3db5fdf179
REPORT RequestId: aa29cf83-7b5f-47a4-947d-4f3db5fdf179 Duration: 315.32 ms Billed Duration: 400 ms Memory Size: 128 MB Max Memory Used: 13 MB
RequestId: aa29cf83-7b5f-47a4-947d-4f3db5fdf179 Error: Runtime exited with error: exit status 1
Runtime.ExitError
Invoking from CLI
aws lambda invoke \
--function-name HelloWorld \
--region eu-north-1 \
--log-type Tail \
--payload '{"msg": "a fake request"}' \
outputfile.txt
output.txt
> cat outputfile.txt
{"errorType":"Runtime.ExitError","errorMessage":"RequestId: 403e99d9-896d-4541-a913-0c45ac7debac Error: Runtime exited with error: exit status 1"}%
hello_world_lambda.ex
defmodule HelloWorldLambda do
@moduledoc """
Documentation for HelloWorldLambda.
"""
@doc """
Hello world.
## Examples
iex> HelloWorldLambda.hello()
:world
"""
def hello(request, context) do
"""
Hello World!
Request: #{Kernel.inspect(request)}
Context: #{Kernel.inspect(context)}
"""
|> IO.puts()
:ok
end
end
- Dominant language
- Elixir
- Stars
- 129
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/aws-lambda-elixir-runtime
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
missing dependencies Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
aws-samples/aws-lambda-elixir-runtime#11 · 1 comment ·
All issues in aws-samples/aws-lambda-elixir-runtime
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
phoenixframework/phoenix#6847 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
moderation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
beyond-all-reason/teiserver#1584 · 1 comment ·