在......中的映射条目缩进不良。 动作

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

我正在构建一个无服务器模板来读取S3 bucket,但当我运行命令时,我得到了这个错误的信息 serverless login 错误 : bad indentation of a mapping entry in "xxxx\serverless.yml" at line 12, column 15: Action: ^

provider:
  name: aws
  runtime: python3.8

# you can overwrite defaults here
#  stage: dev
#  region: us-east-1

# you can add statements to the Lambda function's IAM Role here
  iamRoleStatements:
    - Effect: Allow
        Action:
          - s3:*
        Resource: ${self:custom.s3_role_resource}
amazon-s3 yaml serverless-framework
1个回答
1
投票

Action 中的映射条目缩进不良,应该与 "xxxx/serverless.yml "中的 Effect

iamRoleStatements:
  - Effect: Allow
    Action:
      - s3:*
    Resource: ${self:custom.s3_role_resource}
© www.soinside.com 2019 - 2024. All rights reserved.