aws-amplify / aws-amplify/amplify-hosting

Next.js API cannot write to local filesystem

Open
#3,271 2 comments 0 reactions 0 assignees View on GitHub
investigating question ssr
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

dfdjxwveeb91i

### AWS Region

sa-east-1

### Amplify Hosting feature

SSR

### Describe the bug

The same as reported in #3098

Only now do I have time to retry the suggested implementation after It was said to be solved.

Unfortunately, I get the same response from Lambda@EDGE (Api execution):

```
EROFS: read-only file system, open './service-account-file.json'"
```

### Expected behavior

The same as reported in #3098

### Reproduction steps

The same as reported in #3098

### Build Settings

_No response_

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the referenced issue #3098 and its suggested implementation, then inspect how the Next.js SSR API runs in Lambda@Edge. Reproduce the EROFS error for './service-account-file.json' and document or implement a supported resolution for the local filesystem behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, next.js
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.