Runtime.ExitError: Cannot create directory ‘/var/task/var’: Read-only file system
还没有人认领这个 Issue。
评估
调研方向
从 /var/task/bootstrap 入口点和 hello_world_lambda.ex 示例开始,然后在检查记录的启动命令时重新执行 aws lambda invoke 命令。跟踪哪个启动步骤尝试创建 /var/task/var;完成的标志是 runtime 可以在不出现只读文件系统错误的情况下被调用,并且函数到达其正常响应路径。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Elixir
- 星标
- 129
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws-samples/aws-lambda-elixir-runtime 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 30/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 30/100
aws-samples/aws-lambda-elixir-runtime#11 · 1 条评论 ·
查看 aws-samples/aws-lambda-elixir-runtime 的全部 Issue
相似的 Issue
-
P2 testing
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
enhancement javascript
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
beyond-all-reason/teiserver#1622 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
phoenixframework/phoenix_template#15 · 1 条评论 ·
-
L: javascript T: bug 🐞
难度 2/5 1-3 小时 新手友好度 65/100
dependabot/dependabot-core#16397 ·
维护者通常 1 天内回复