我正在使用aws CLI(aws-cli / 1.12.1 Python / 3.6.0 Windows / 10 botocore / 1.8.1)使用
将一些数据上传到DynamoDBaws dynamodb batch-write-item --request-items file://C:/users/public/data.json
data.json包含德语字符,例如“Ö”。这是完整的data.json
{
"products": [{
"PutRequest": {
"Item": {
"content": {
"S": "Ölperlen Pfirsich"
},
"requestId": {
"S": "a94b879d-5bd3-4081-a672-f72d3465a4cb"
},
"userId": {
"S": "eu-central-1:someid"
}
}
}
}
]
}
命令成功;但是,当“content”属性到达DynamoDb时,值如下所示:
Ã-lperlen Pfirsich
调试时,我可以看到解包阶段出现问题:
2017-11-27 08:31:17,216 - MainThread - awscli.arguments - DEBUG - “{\ n \ t”“产品”的解压缩值:[{\ n \ t \ t \ t \ T“PutRequest”: {\ n \ t \ t \ t \ t“项目”:{\ n \ t \ t \ t \ t \ t \ t“内容”:{\ n \ t \ t \ t \ t \ t \ t \ t“S” : “Ã-lperlen Pfirsich”\ n \ t \ t \ t \ t \ t \ t},\ n \ t \ t \ t \ t \ t \ t“”requestId“: {\ n \吨\吨\吨\吨\吨\ t “的S”: “a94b879d-5bd3-4081-a672-f72d3465a4cb” \ n \吨\吨\吨\吨\吨},\ n \吨\吨\吨\吨\ t “的用户id”: {\ n \吨\吨\吨\吨\吨\ t “的S”: “EU-中央-1:someid” \ n \吨\吨\吨\吨\吨} \ n \吨\吨\吨\吨} \ n \吨\吨\吨} \ n \吨\吨} \ ñ\吨] \ N}” 对于参数“request_items”:OrderedDict([('requests', [OrderedDict([('PutRequest',OrderedDict([('Item', OrderedDict([('content',OrderedDict([('S','Ã-lperlen Pfirsich')])), ('requestId',OrderedDict([('S', 'a94b879d-5bd3-4081-a672-f72d3465a4cb')])),('userId', OrderedDict([('S','eu-central-1:someid')]))]))]))])])])
其他人在使用CLI在DynamoDb中编写非ASCII字符时遇到了问题吗?