我有一个像这样的DynamoDB表定义:
import PySimpleGUI as sg
# All the stuff inside your window.
layout [
[sg.Image(data=image1,key='__IMAGE__',size=(5,6))]
]
# Create the Window
window = sg.Window('Window Title',layout)
# Event Loop to process "events" and get the "values" of the inputs
while True:
event,values = window.read()
if event in (None,'Cancel'): # if user closes window or clicks cancel
break
window.Element('_IMAGE_').Update(data=image2)
window.close()
其中“ pk”是分区密钥。而“ sk”是排序键。如果您想知道为什么pk和sk都具有相同的值:Adjacency List Design Pattern。
我已在“索引”属性上创建了全局二级索引。它的投影都是pk和sk键。
现在,following the documentation我正在这样查询我的GSI:
{
"pk": {
"S": "00000000-0000-0000-0000-000000000001"
},"sk": {
"S": "00000000-0000-0000-0000-000000000001"
},"year": {
"N": "2019"
}
"index": {
"N": "987654321"
}
}
我收到以下错误消息:'MissingRequiredParameter:在参数中缺少必需的键\'Key \'\ n
以防万一,我在Lambda中使用Node.js 8.10