Skip to content

[init] Amplify로 프로젝트 생성

TaeSeong Park edited this page Jun 12, 2020 · 1 revision

1. AWS 계정 세팅

~/.aws/credentials 에 프로젝트에서 사용할 AWS 계정 정보를 추가한다

[kendra-geoseong]
aws_access_key_id=*****
aws_secret_access_key=*****

~/.aws/config~/.aws/credentials 에 설정한 profile 이름을 추가한다

  • 이 세팅을 해야 Amplify CLI로 프로필을 고를 때 목록에 나온다.
[profile kendra-geoseong]
region=us-west-2

2. Amplify CLI로 프로젝트 생성

frontend/kendra-button-front 폴더 안에서 프로젝트를 생성한다

$ amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project kendrabutton
? Enter a name for the environment dev
? 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:  src
? Distribution Directory Path: out
? Build Command:  npm run-script build
? Start Command: npm run-script start
Using default provider  awscloudformation

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

3. Amplify 프로젝트 생성 확인

$ amplify console

웹 브라우저가 뜨면서 AWS Console을 통하여 방금 생성한 Amplify 프로젝트 화면으로 이동된다.