简体   繁体   English

在 AWS 放大中构建应用程序时出现错误 403

[英]error 403 while building the app in AWS amplify

I was trying to build a simple serverless web app in AWS.我试图在 AWS 中构建一个简单的无服务器 web 应用程序。 So, I put my static files in codecommit and tried to host it through AWS Amplify.The AWS builds the amplify.yml for us by default, but it is failing in the build stage.因此,我将我的 static 文件放入 codecommit 并尝试通过 AWS Amplify 托管它。AWS 默认为我们构建 amplify.yml,但在构建阶段失败。 I understood that there is something wrong in amplify.yml and am not getting how to configure it.我知道 amplify.yml 有问题,并且不知道如何配置它。

amplify.yml:放大.yml:

version: 1
frontend:
  phases:
    # IMPORTANT - Please verify your build commands
    build:
      commands: []
  artifacts:
    # IMPORTANT - Please verify your build output directory
    baseDirectory: /
    files:
      - '**/*'
  cache:
    paths: []

error I was shown:我被显示的错误:

2021-01-23T15:01:54.840Z [INFO]: # Cloning repository: https://git-codecommit.us-east- 
2.amazonaws.com/v1/repos/wildrydes-site
2021-01-23T15:01:55.176Z [INFO]: Cloning into 'wildrydes-site'...
2021-01-23T15:02:02.660Z [INFO]: fatal: unable to access 'https://git-codecommit.us-east- 
2.amazonaws.com/v1/repos/wildrydes-site/': The requested URL returned error: 403

With the limited amount of information provided, the best I can offer is the issue is somewhere in your IAM privileges for your CodeCommit user.由于提供的信息量有限,我能提供的最好的信息是问题出在您的 CodeCommit 用户的 IAM 权限中。 AWS components generally need to have the appropriate Group, Role, and/or Policy to complete the action. AWS 组件通常需要具有适当的组、角色和/或策略才能完成操作。

Put another way: CodeCommit is giving a 403 Forbidden error because whatever is attempting doing the cloning doesn't have the right permissions.换句话说:CodeCommit 给出了 403 Forbidden 错误,因为尝试进行克隆的任何东西都没有正确的权限。 Give it the right permissions.给它正确的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM