构建期间 AWS Cloudformation 代码管道错误

问题描述 投票:0回答:0

嗨,我是 AWS 的新手,这是我第一次创建管道过程,我在 youtube 上遵循了这个教程https://www.youtube.com/watch?v=UlX38mVvMy8

但是我在代码构建中执行此行时遇到此错误:“aws cloudformation package --template-file template.yaml --s3-bucket $BUCKET --output-template-file outputtemplate.yaml”

'无法上传工件 ./ 由 TimeFunction 资源的 CodeUri 参数引用。 调用PutObject操作时发生错误(AccessDenied):Access Denied'

知道可能是什么问题吗?

编辑:

这是template.yaml的内容

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Outputs the time
Resources:
  TimeFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs10.x
      CodeUri: ./
      Events:
        MyTimeApi:
          Type: Api
          Properties:
            Path: /TimeResource
            Method: GET

amazon-web-services aws-cloudformation aws-codepipeline aws-codebuild
© www.soinside.com 2019 - 2024. All rights reserved.