aws-amplify / aws-amplify/amplify-hosting
Headless push with Aurora doesn't work on PR-Previews
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
Amplify push on PR-Previews via Amplify Console got stuck waiting for RDS parameters [region, cluster, database].
Those parameters come from the `amplify/team-provider-info.json`.
But during the PR-Preview, the stack is build on runtime, so those values are not available.
**Amplify CLI Version**
This is present on this versions
```
4.32.1
4.44.1
```
**To Reproduce**
Create a project with
- Auth
- GraphQL API with an Aurora RDS
- Connect with Amplify Console
- Configure the PR-Preview Feature
- Push a PR
**Expected behavior**
Have the option to pass RDS parameters as part of the configuration like [ADVANCED WORKFLOWS -
Headless mode for CI/CD](https://docs.amplify.aws/cli/usage/headless#sample-script-3)
For example
```
AUTHCONFIG="{\
\"googleClientId\":\"${AMPLIFY_GOOGLE_CLIENT_ID}\",\
\"googleAppIdUserPool\":\"${AMPLIFY_GOOGLE_CLIENT_ID}\",\
\"googleAppSecretUserPool\":\"${AMPLIFY_GOOGLE_CLIENT_SECRET}\"\
}"
RDS_CONFIG="{\
\"rdsRegion\":\"${RDS_REGION}\",\
\"rdsClusterIdentifier\":\"${RDS_CLUSTER_ARN}\",\
\"rdsSecretStoreArn\":\"${RDS_SECRET_ARN}\",\
\"rdsDatabaseName\":\"${ENV}\"\
}"
CATEGORIES="{\
\"auth\":${AUTHCONFIG},\
\"api\":${RDS_CONFIG}\
}"
```
**Screenshots**
At the Amplify Console the build got stuck, but nothing was shown

Running the script locally with the same env variables

We can see the console got stuck waiting for user confirmations
Related with [Amplify Console build fails (API/RDS). Is team-provider-info.json ignored? aws-amplify/amplify-cli#350](https://github.com/aws-amplify/amplify-console/issues/350)
[Headless push with Aurora doesn't work on PR-Previews at Amplify Console aws-amplify/amplify-category-api#206](aws-amplify/amplify-category-api#206)
**Desktop (please complete the following information):**
- OS: Ubuntu at Amplify Console - 137112412989.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:2
- Node Version. v12.10.0
**Additional context**
[Project on Amplify Console #d234qd3dwq9k16](https://console.aws.amazon.com/amplify/home?region=us-east-1#/d234qd3dwq9k16/pr-1671)
Contributor guide
Research direction
Start with the Amplify Console PR-Preview build flow and the headless-mode configuration described in the issue, then compare it with amplify/team-provider-info.json handling. Reproduce the Auth/GraphQL/Aurora project using the listed CLI versions and confirm done when RDS parameters can be supplied non-interactively and the PR preview completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, node.js
- Domain
- api, ci-cd, cloud, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100