【发布时间】:2018-12-21 13:02:46
【问题描述】:
我正在尝试为我的 Lambda 函数添加 2 个角色购买我收到此错误:
iamRoleStatements 应该是一个对象数组,其中每个对象都有 Effect、Action、Resource 字段。具体来说,语句 1 缺少以下属性:资源
我的代码:
InsertImageDB:
handler: index.lambda_handler
module: InsertImageDB
iamRoleStatements:
- Effect: "Allow"
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:UpdateItem
- dynamodb:GetItem
- dynamodb:PutItem
Resource:
Fn::GetAtt:
- imageLibraryTable
- Arn
- Effect: "Allow"
Action:
- sns:*
Ressource:
Ref: DetectLabelTopic
请注意,我使用的是 serverless-iam-roles-per-function,它允许为每个函数添加单独的角色。
【问题讨论】:
标签: amazon-web-services serverless-framework