Skip to content

rply causes a crash on read-only filesystems #1598

@dsevero

Description

@dsevero

I currently have the following file setup on AWS Lambda:

challenge
├── handlers.py
├── hello.hy
├── __init__.hy
└── __init__.py

handlers.py

import hy
from hello import hello

hello.hy

(import [json [dumps]])

(defn hello [event context]
  (setv body {"message" "Go Serverless v1.0! Your function executed successfully!"
              "input" event})
  ({"statusCode" 200
    "body" (dumps body)}))

AWS lambda calls the hello function inside handlers.py. My objective was to use this file as a proxy for writing aws lambda functions with hylang. But I keep getting this error when executing it in production:

module initialization error
[Errno 30] Read-only file system: '/home/sbx_user1059'

(the number 1059 varies)

I think this is due to the AST compiling on importing hy in handlers.py. AWS lambda does not permit that directory to be written.

Any way that this could be circumvented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions