我正在尝试使用aws-sdk
与 AWS 的 dynamodb 进行交互
这是我的代码:
DynamoDB.putItem({
"TableName": tblName,
"Item": {
"UserId": { "N": obj.user_id.toString() },
"Identifier": { "S": obj.identifier },
"ReferralToken": { "S": obj.referral_token },
"CampaignId": { "N": obj.campaign_id.toString() },
"FirstName": { "S": obj.first_name },
"LastName": { "S": obj.last_name },
"Gender": { "S": obj.gender },
"BirthDate": { "S": obj.birthdate },
"Username": { "S": obj.username },
"MobileNumber": { "S": obj.mobile_number },
"PostalCodeText": { "S": obj.postal_code_text },
"Classification": { "S": obj.classification },
"DeliveryEmail": { "S": obj.delivery_email.toString() },
"DeliverySMS": { "S": obj.delivery_sms.toString() }
}
}, function (err, data) {
console.log(err);
console.log(data);
});
我收到的错误是
{ [ValidationException: Supplied AttributeValue is empty, must contain exactly one of the supported datatypes]
message: 'Supplied AttributeValue is empty, must contain exactly one of the supported datatypes',
code: 'ValidationException',
time: Fri Oct 10 2014 10:15:25 GMT-0500 (CDT),
statusCode: 400,
retryable: false }
不知道我做错了什么