aws-amplify / aws-amplify/amplify-hosting

Configurable SSR compute (Lambda) memory for WEB_COMPUTE applications

Open
#4,108 1 comment 1 reaction 0 assignees View on GitHub
feature-request
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 removed any sensitive information from my code snippets and submission.

### Amplify Hosting feature

SSR

### Is your feature request related to a problem? Please describe:

Amplify Hosting WEB_COMPUTE applications are limited to a fixed 1024 MB of memory for the SSR compute Lambda. This is a hard limit that cannot be configured through any customer-facing mechanism (Amplify Console, UpdateApp/UpdateBranch API, deploy-manifest.json, or Service Quotas).

For applications that perform memory-intensive server-side rendering (such as image processing with sharp/libvips, PDF generation, or heavy data transformations), this fixed 1024 MB ceiling causes Runtime.OutOfMemory errors and forced process termination with no way for customers to address the constraint.

The runtime overhead of Next.js itself consumes approximately 90-100 MB, leaving roughly 920-930 MB of usable memory for application logic. Production workloads that approach this ceiling experience OOM kills with HTTP 500 responses and empty bodies.

CloudWatch REPORT lines confirm the fixed allocation:
REPORT RequestId: xxx Duration: xxx Memory Size: 1024 MB Max Memory Used: 1024 MB Status: error Error Type: Runtime.OutOfMemory

### Describe how you'd like this feature to work

Allow customers to configure the SSR compute (Lambda) memory allocation for WEB_COMPUTE applications. Ideally this would be:

1. A new field in the Amplify API (UpdateApp or UpdateBranch) such as computeMemorySize accepting values from 512 MB to 10,240 MB
2. Exposed in the Amplify Console under App settings or Branch settings
3. Optionally configurable via the deployment specification (deploy-manifest.json) as a memorySize field on the ComputeResource type

This is analogous to the existing buildComputeType setting (STANDARD_8GB, LARGE_16GB, XLARGE_72GB) which allows customers to configure build instance resources, but applied to the SSR runtime instead.

At 1,769 MB, a Lambda function gets the equivalent of one full vCPU, which would also significantly improve cold start times due to proportional CPU scaling. This would address both memory-bound and CPU-bound SSR workloads.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing UpdateApp and UpdateBranch API surfaces, Amplify Console settings, and deploy-manifest.json, especially the ComputeResource and buildComputeType concepts mentioned in the request. Trace how WEB_COMPUTE memory is currently selected and identify the relevant SSR Lambda configuration path. Done means customers can configure and apply the SSR compute memory through the agreed supported surfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.