我正在为serverless.yml文件中的Lambda函数创建一个角色声明,但是我一直收到此错误
“映射条目缩进不良”
文件的外观如下:
iamRoleStatements:
- Effect: "Allow"
Action:
- "sns:Publish"
Resource: "arn:aws:sns:*:*:*"
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
Resource: "arn:aws:logs:us-east-1:888186450240:*"
答案 0 :(得分:3)
iamRoleStatements:
- Effect: "Allow"
Action:
- "sns:Publish"
Resource: "arn:aws:sns:*:*:*"
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
Resource: "arn:aws:logs:us-east-1:888186450240:*"
iamRoleStatements
是一个对象数组