在CodeStar AWS中使用EBS部署时出错

时间:2019-02-06 22:46:27

标签: amazon-web-services amazon-elastic-beanstalk aws-codestar

我是AWS的新手,我尝试使用CodeStar创建应用程序。我的应用程序是用PERN编写的,但我无法使其正常工作。

这是我在package.json中的脚本:

"scripts": {
    "start": "node server",
    "dev:test": "mocha --recursive tests --exit",
    "start:dev": "webpack-dev-server --config ./webpack/webpack.config.js --mode development --open --hot --history-api-fallback",
    "prestart:prod": "webpack --mode production --config ./webpack/webpack.prod.config.js --env.NODE_ENV=production --progress --colors",
    "start:prod": "node server"
 },

还有我的buildspec.yml:

version: 0.2

phases:
  install:
    commands:
      # Install dependencies needed for running tests
      - npm install

      # Upgrade AWS CLI to the latest version
      - pip3 install --upgrade awscli
  pre_build:
    commands:
      # Discover and run unit tests in the 'tests' directory
      - npm test
  build:
    commands:
      - echo Build started on `date`
  post_build:
    commands:
      # Remove existing node_modules to clear dev dependencies
      - rm -r node_modules

      # Install runtime dependencies
      - npm install
      # - npm install --production

      - aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template-file template-export.yml

     # Do not remove this statement. This command is required for AWS CodeStar projects.
     # Update the AWS Partition, AWS Region, account ID and project ID in the project ARN on template-configuration.json file so AWS CloudFormation can tag project resources.
  - sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-configuration.json
artifacts:
 type: zip
 files:
   - template-export.yml
   - template-configuration.json

并且我网站上的错误消息是“找不到404”。

这里似乎是什么问题?我一直在网上搜索,但找不到任何解决方案。感谢您的帮助。

0 个答案:

没有答案