aws-amplify / aws-amplify/amplify-hosting
CI/CD build failed on new Hosted web app
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-js/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-js/discussions).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### JavaScript Framework
Vue
### Amplify APIs
Authentication, GraphQL API
### Amplify Categories
auth, api, hosting
### Environment information
```
# Put output below this line
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 14.46 GB / 31.77 GB
Binaries:
Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.6.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 113.0.5672.92
Edge: Spartan (44.19041.1266.0), Chromium (113.0.1774.35)
Internet Explorer: 11.0.19041.1566
npmPackages:
@vue-responsive-dash/chartjs: ^0.1.4 => 0.1.4
@vue/cli-plugin-eslint: ~4.5.0 => 4.5.19
@vue/cli-plugin-router: ~4.5.0 => 4.5.19
@vue/cli-plugin-vuex: ~4.5.0 => 4.5.19
@vue/cli-service: ~4.5.0 => 4.5.19
@vue/compiler-sfc: 2.7.14
@vue/eslint-config-prettier: ^6.0.0 => 6.0.0
aws-amplify: ^5.2.0 => 5.2.0
axios: ^0.21.1 => 0.21.4 (0.26.0)
chart.js: ^2.9.4 => 2.9.4
chartjs-plugin-datalabels: ^1.0.0 => 1.0.0
collect.js: ^4.34.3 => 4.36.1
data-table-vue: ^2.0.11 => 2.0.15
dev: 1.0.0
element-ui: ^2.15.12 => 2.15.13
eslint: ^6.8.0 => 6.8.0
eslint-plugin-prettier: ^3.3.1 => 3.4.1
eslint-plugin-vue: ^6.2.2 => 6.2.2
moment: ^2.29.4 => 2.29.4
prettier: ^2.2.1 => 2.8.8
sass: ~1.32.0 => 1.32.13
sass-loader: ^10.0.0 => 10.4.1
vue: ^2.6.11 => 2.7.14
vue-chartjs: ^3.5.1 => 3.5.1
vue-cli-plugin-vuetify: ~2.4.1 => 2.4.8
vue-excel-editor: ^1.5.19 => 1.5.19
vue-fullscreen: ^2.6.1 => 2.6.1
vue-responsive-dash: ^0.5.0 => 0.5.0
vue-router: ^3.2.0 => 3.6.5
vue-speedometer: ^1.8.0 => 1.8.0
vue-template-compiler: ^2.6.11 => 2.7.14
vue-xlsx: ^0.2.1 => 0.2.1
vue2-quill-editor: ^2.0.26 => 2.0.26
vuedraggable: ^2.24.3 => 2.24.3
vuetify: ^2.4.0 => 2.6.15
vuetify-loader: ^1.7.0 => 1.9.2
vuex: ^3.4.0 => 3.6.2
npmGlobalPackages:
@aws-amplify/cli: 10.2.0
@vue/cli: 5.0.8
npm: 9.6.2
```
### Describe the bug
When connecting a CodeCommit repository to Amplify using built-in CI/CD, there is a bug that causes the app to fail on 'Backend Build' during deployment. The error message that is displayed states that the environment is missing values for 'appId' and 'type'.
### Expected behavior
The app should deploy after connecting to a branch.
### Reproduction steps
1.) Create a new CodeCommit repository in AWS.
2.) Create a new Amplify app in the Amplify console, connect the CodeCommit repository to the Amplify app using the built-in CI/CD feature.
3.) Use default build settings.
4.) App should starting deploying.
5.) Observe that the deployment fails with the error message "This environment is missing some parameter values. [appId,type] do not have values."
### Code Snippet
```javascript
// Put your code below this line.
```
### Log output
```
// Put your logs below this line
2023-05-10T19:36:14.703Z [INFO]: ## Starting Backend Build
# Starting phase: build
2023-05-10T19:36:16.688Z [INFO]: 🛑 This environment is missing some parameter values.
[appId,type] do not have values.
2023-05-10T19:36:16.689Z [INFO]: Resolution: Run 'amplify push' interactively to specify values.
Alternatively, manually add values in SSM ParameterStore for the following parameter names:
/amplify/d33kgav0kn9955/main/AMPLIFY_hosting_amplifyhosting_appId
/amplify/d33kgav0kn9955/main/AMPLIFY_hosting_amplifyhosting_type
Learn more at: https://docs.amplify.aws/cli/reference/ssm-parameter-store/#manually-creating-parameters
2023-05-10T19:36:16.696Z [INFO]:
2023-05-10T19:36:16.696Z [INFO]: Session Identifier: 2e59d688-3983-4516-bea9-874cdde2766c
2023-05-10T19:36:16.696Z [WARNING]: - Creating Zip
2023-05-10T19:36:16.719Z [INFO]:
2023-05-10T19:36:16.719Z [INFO]: ✅ Report saved: /tmp/mrms/report-1683747376700.zip
2023-05-10T19:36:16.719Z [WARNING]: - Sending zip
2023-05-10T19:36:16.719Z [INFO]: File at path: '/codebuild/output/src663805636/src/mRMS-beta/amplify/backend/amplify-meta.json' does not exist
2023-05-10T19:36:16.721Z [WARNING]: ✖ Sending zip
2023-05-10T19:36:16.737Z [ERROR]: !!! Build failed
2023-05-10T19:36:16.737Z [ERROR]: !!! Non-Zero Exit Code detected
2023-05-10T19:36:16.737Z [INFO]: # Starting environment caching...
2023-05-10T19:36:16.738Z [INFO]: # Environment caching completed
Terminating logging...
```
### aws-exports.js
```javascript
/* eslint-disable */
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "us-east-1",
"aws_appsync_graphqlEndpoint": "https://2ljeiv6uvnddpfkkh4koisclym.appsync-api.us-east-1.amazonaws.com/graphql",
"aws_appsync_region": "us-east-1",
"aws_appsync_authenticationType": "API_KEY",
"aws_appsync_apiKey": "da2-rec6dczf7jdclaslnongrdvldi",
"aws_cognito_identity_pool_id": "us-east-1:7be81c1f-475f-4327-aacf-26f9705e399b",
"aws_cognito_region": "us-east-1",
"aws_user_pools_id": "us-east-1_uu3Tjc2Vg",
"aws_user_pools_web_client_id": "32otfepd1qnbgs2965a9eeere2",
"oauth": {},
"aws_cognito_username_attributes": [
"EMAIL"
],
"aws_cognito_social_providers": [],
"aws_cognito_signup_attributes": [
"EMAIL"
],
"aws_cognito_mfa_configuration": "OFF",
"aws_cognito_mfa_types": [
"SMS"
],
"aws_cognito_password_protection_settings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": []
},
"aws_cognito_verification_mechanisms": [
"EMAIL"
]
};
export default awsmobile;
```
### Manual configuration
_No response_
### Additional configuration
_No response_
### Mobile Device
_No response_
### Mobile Operating System
_No response_
### Mobile Browser
_No response_
### Mobile Browser Version
_No response_
### Additional information and screenshots
_No response_
Contributor guide
Research direction
The failure occurs during the Hosting Backend Build for a CodeCommit-connected app; start by tracing how the build obtains the appId and type values. Check amplify/backend/amplify-meta.json and the listed SSM Parameter Store paths. Done means the default deployment completes without the missing appId/type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, node.js
- Domain
- ci-cd, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100