aws-amplify / aws-amplify/amplify-hosting
AmplifyPush on AWS Amplify portal different from amplify push in cmd line
- 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.
### 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
1. `amplify pull --appId dofeuoscsvwes --envName dev`
2. `amplify push`
3. 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](https://github.com/aws-amplify/amplify-hosting/files/9397747/log.21.txt)
### Build Settings
```yaml
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.
Contributor guide
Research direction
Start with amplify.yml, the attached portal log, and the documented commands amplify push and amplifyPush. Reproduce the sequence with Python 3.8, Node 14, and Amplify CLI 9.2.1, then compare the local and portal build environments. Done means the cause of the portal failure is identified and the build either succeeds or reports an actionable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, python
- Domain
- backend, ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100