我正在构建一个无服务器模板来读取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}
Action
中的映射条目缩进不良,应该与 "xxxx/serverless.yml "中的 Effect
iamRoleStatements:
- Effect: Allow
Action:
- s3:*
Resource: ${self:custom.s3_role_resource}