awskrug / kendra-button

Custom search engine using Kendra
http://button.kendra.fun/sample.html
Apache License 2.0
20 stars 2 forks source link

Amplify 팀 환경설정 세팅하기 #16

Closed geoseong closed 4 years ago

geoseong commented 4 years ago

Amplify Document: TEAM ENVIRONMENTS

다수의 개발자가 하나의 Amplify 리소스로 협업하는 방법 강구 및 구현

For more information on AWS Profiles, see: https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

? Do you want to use an AWS profile? Yes ? Please choose the profile you want to use kendra-geoseong ? Which app are you working on? (Use arrow keys) ❯ kendrafrontend Backend environment 'dev' found. Initializing... ? Choose your default editor: Visual Studio Code ? Choose the type of app that you're building javascript Please tell us about your project ? What javascript framework are you using react ? Source Directory Path: kendra-button-front ? Distribution Directory Path: kendra-button-front/out ? Build Command: yarn export ? Start Command: npm run-script start

? Do you plan on modifying this backend? (Y/n) <- 저는 n을 했는데 다른 분들은 y를 했을 때 어떻게 작동되는 지 알고 싶네요


**aws-exports.js**
```js
const awsmobile = {
    "aws_project_region": "us-west-2",
    "aws_cognito_identity_pool_id": "xxxx",
    "aws_cognito_region": "us-west-2",
    "aws_user_pools_id": "xxxx",
    "aws_user_pools_web_client_id": "xxxx",
    "oauth": {}
};
Dailyscat commented 4 years ago

슬랙에 대조 값과 n을 입력했을 때의 콘솔 값 게시

hunkim commented 4 years ago

저는 이런 에러가 나오는데요. 이게 모두가 같은 서브 계정을 사용해야 하는 것인가요?

(.venv) hunkim@AL01516240 frontend %  amplify pull
Scanning for plugins...
Plugin scan successful

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use default
No Amplify apps found. Please ensure your local profile matches the AWS account or region in which the Amplify app exists.
Failed to pull the backend.
Error: No Amplify apps found. Please ensure your local profile matches the AWS account or region in which the Amplify app exists.
    at getAmplifyApp (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/attach-backend.js:146:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/attach-backend.js:31:22)
    at Object.attachBackend (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/index.js:30:3)
    at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/attach-backend-steps/a10-queryProvider.js:11:3)
    at attachBackend (/usr/local/lib/node_modules/@aws-amplify/cli/src/attach-backend.js:16:3)
    at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/commands/pull.js:45:7)
    at Object.executeAmplifyCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/index.ts:116:3)
    at executePluginModuleCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:158:7)
    at Object.executeCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:24:5)
(.venv) hunkim@AL01516240 frontend % 
geoseong commented 4 years ago

@hunkim 네 맞습니다. 리소스를 갖고 있는 루트 계정 혹은 그 계정의 서브 계정 프로필이 로컬에 세팅되어 있어야 가능하실겁니다

hunkim commented 4 years ago

@serithemage 이거 한번 확인 부탁드립니다. 이렇게 되면 협업하는 멤버들이 모두 같은 root계정을 가져야 하는데 AWS에서 방법을 만들어 놓았을듯 합니다.