aws-amplify / aws-amplify/amplify-hosting
NextJS custom server support
- 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 questions](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have removed any sensitive information from my code snippets and submission.
### App Id
d8bhu9x5u3nf0
### AWS Region
us-east-1
### Amplify Hosting feature
Not Applicable
### Question
Does AWS Amplify supports deployment of NextJS applications with [custom servers](https://nextjs.org/docs/advanced-features/custom-server)?
Does it execute the `start` command from the application's package.json, or does it use `next start` under the hood by default when spinning the application?
```json
"scripts": {
"start": "node -r ./instruments.js server.js",
}
```
I'm interested in having a custom server to instrument my application with OpenTelemetry. I was able to deploy it successfully but I have no evidence that my server was actually instrumented. Thanks in advance!
Contributor guide
Research direction
Start with the application's package.json start script, then inspect server.js and instruments.js to understand the deployed process and instrumentation evidence. Done means the supported behavior for custom Next.js servers and the effective startup command are confirmed and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, node.js
- Domain
- backend, cloud, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100