amplify-hosting
amplify-hosting copied to clipboard
AmplifyPush on AWS Amplify portal different from amplify push in cmd line
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
dofeuoscsvwes
Region
ca-central-1
Amplify Hosting feature
Backend builds
Describe the bug
When running amplify push locally, I am able to successfully push my Amplify project to the cloud. However, when I trigger the exact same build through AWS Amplify portal, it results in the build failing. The only difference being it uses amplify push vs amplifyPush on the AWS Amplify portal (which is recommended by the docs).
Expected behavior
I expect both backend builds to be able to build properly. Currently, since I am unable to build through the AWS Amplify portal, I am unable to build my front-end (dependency).
Reproduction steps
amplify pull --appId dofeuoscsvwes --envName devamplify push- Try to build the app in the portal and it will result in a build failure.
I have attached an example of the failing logs from the AWS amplify portal. There is no indication on why the build is failing. It's 2022-08-22T21:33:27.156Z [INFO]: Installing dependencies from Pipfile.lock (0b4aaa)... and then all of sudden, the build crashes with no error messages.
log.txt
Build Settings
amplify.yml
version: 1
backend:
phases:
build:
commands:
- update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 10
- /usr/local/bin/pip3.8 install --user pipenv
- amplifyPush --environment dev
- python 3.8
- node 14
- amplify cli - 9.2.1
### Additional information
Is there a reason why the behaviour is different. Alternatively, it would be great if the build logs from the AWS Amplify portal provided an error message on why exactly it's failing.
Hi @eric-zhu-uw your build failed because the build container ran out of memory. Can you try to set environment variable NODE_OPTIONS to --max-old-space-size=4096?
@hloriana I set the environment variable NODE_OPTIONS to --max-old-space-size=4096 and --max-old-space-size=6144 all resulting in the same crashing build. How were you able to confirm that the build container ran out of memory or that this was the root cause?
Also on a different note, is there any way to limit the memory usage of the build? Maybe that could be a work around to get the build not to crash.
Also it like the build environment is already provisioned with 7GB of memory which seems to be unadjustable.

@hloriana Would it be possible to get some more insights on why this build is failing? There is no error message for me to work and I'm unable to replicate the issue locally.