Chúng ta thực hiện các bước dưới đây để chuẩn bị cho việc xác thực và lưu tệp với thư viện Amplify trong phần sau:
npm install -g @aws-amplify/cli
Bạn phải cài đặt NodeJs trước khi cài đặt Amplify CLI
Bạn nên tạo một user và cấu hình một AWS profile với thông tin xác thực trên máy của bạn.
git clone https://github.com/AWS-First-Cloud-Journey/FCJ-Serverless-DMS
cd FCJ-Serverless-DMS
npm install
amplify init
Nhập theo các thông tin dưới đây:
? Enter a name for the project fcjdms
The following configuration will be applied:
Project information
| Name: fcjdms
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: react
| Source Directory Path: src
| Distribution Directory Path: build
| Build Command: npm run-script build
| Start Command: npm run-script start
? Initialize the project with the above configuration? Yes
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
? Please choose the profile you want to use default
? Help improve Amplify CLI by sharing non sensitive configurations on failures (y/N) › No