【问题标题】:Bad indentation of a mapping entry in ... Action... 操作中映射条目的缩进错误
【发布时间】:2020-06-05 07:49:23
【问题描述】:

我正在构建一个无服务器模板来读取 S3 存储桶,但是当我运行命令 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】:

    Action 应该与Effect 对齐

    iamRoleStatements:
      - Effect: Allow
        Action:
          - s3:*
        Resource: ${self:custom.s3_role_resource}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-21
      • 1970-01-01
      • 2019-04-08
      • 1970-01-01
      • 2020-07-25
      • 2017-06-14
      相关资源
      最近更新 更多