aws-amplify / aws-amplify/amplify-hosting

Conditional backend builds should support custom commands in backend phase

Open
#3,121 2 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Per https://docs.aws.amazon.com/amplify/latest/userguide/conditional-backends.html: "If you currently have custom commands specified in the build settings of your backend phase, conditional backend builds won't work. If you want those custom commands to run, you must move them to the frontend phase of your build settings in your app's amplify.yml file. For more information about updating the amplify.yml file, see [Build specification YAML syntax](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#yml-specification-syntax)."

**Describe the solution you'd like**
It is normal however to have custom scripts, for example, we need to run 'npm ci' before the backend build so that custom graphql transformers, needed by our amplify backend, are installed.

**Additional context**
I don't understand why you don't support custom commands. More explanation, and an update on whether you plan to support conditional backend builds with custom commands would be helpful.

Contributor guide

Open the contributing guide

Research direction

Start with the conditional backend builds and build specification YAML syntax described in the issue and linked AWS documentation. Determine where backend-phase custom commands are handled and how the existing build flow treats them. Done means a documented and tested path for custom backend commands, including commands such as npm ci, during conditional backend builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql, yaml
Domain
backend, ci-cd, cloud, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.