Hoe在aws中运行Node js代码进行放大



我有一个React/Node应用程序,我正试图在AWS Amplifier上托管它。第一次尝试时,我部署了我的应用程序,但我看到一些页面/按钮由于nodejs而无法工作。然后我做了一些搜索,我发现我需要修改";放大yml";文件到:

version: 1
backend:
phases:
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
artifacts:
baseDirectory: build
files:
- '**/*'
frontend:
phases:
preBuild:
commands:
- yarn install
build:
commands:
- yarn build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*

使用上述生成设置获取生成问题(生成超时(。

确保您已在IAM中创建了一个具有AdministratorAccess Amplify权限的用户

然后有必要将Hands-On amplify.yml的第6行替换为

npm install-g@aws amplify/cli。

代码现在应该正确显示以完成Hands-On

相关内容

最新更新