难以让角色访问两个表。 template.yaml的示例YAML:
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: path/to/something
Handler: index.handler
Runtime: nodejs10.x
Events:
Get:
Type: Api
Properties:
RestApiId: !Ref MyApi
Path: /path/to/other/thing
Method: post
Policies:
DynamoDBCrudPolicy:
TableName:
table1
table2
我需要此功能才能在table1和table2上进行读取/写入,但这不起作用。我尝试过:
- table1
- table2
但这也不起作用。还尝试过:
Policies:
- DynamoDBCrudPolicy:
TableName:
table1
- DynamoDBCrudPolicy:
TableName:
table2
但是那也错了。如何正确执行此操作?