我有 BatchGetItem 的请求映射模板
{
"version" : "2018-05-29",
"operation" : "BatchGetItem",
"tables" : {
"user-post": { ## Get table name from enviroment varible or CloudFormation
"keys": $util.toJson($ids),
"consistentRead": true
}
}
}
和回应$util.toJson($ctx.result.data.user-post)
。如何从环境变量或 CloudFormation 中自动获取表名,而不是手动编写它。我的映射模板有数据源user-post
- dynamoDB 表。