{
"version": "2017-02-28",
"operation": "PutItem",
"key": {
"id": $util.dynamodb.toDynamoDBJson($util.autoId()),
"createdDate":$core_v2_utility.CurrentDate
},
"attributeValues": $util.dynamodb.toMapValuesJson($ctx.args.input),
"condition": {
"expression": "attribute_not_exists(#id)",
"expressionNames": {
"#id": "id",
"#createdDate":"createdDate",
},
},
}我一直在尝试使用VTL.I将createDate添加到DynamoDB中。我正在使用$core_v2_utility.CurrentDate查找错误
发布于 2018-12-06 14:17:02
亚马逊网络服务AppSync没有$core_v2_utility.CurrentDate。你是想用协调世界时吗?$util.time.nowFormatted("yyyy-MM-dd HH:mm:ssZ")给你的是协调世界时的当前日期和时间。
https://stackoverflow.com/questions/53625805
复制相似问题