Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JavaScript:读取AWS dynamodb中的一项_Javascript_Amazon Web Services_Amazon Dynamodb - Fatal编程技术网

JavaScript:读取AWS dynamodb中的一项

JavaScript:读取AWS dynamodb中的一项,javascript,amazon-web-services,amazon-dynamodb,Javascript,Amazon Web Services,Amazon Dynamodb,我正在尝试读取dynamodb中我的表用户上的数据: 但是得到: 无法读取项目。错误JSON:{“消息”:“请求的资源不可用” 已找到“,”代码“:”ResourceNotFoundException“,”时间“: “2018-12-27T17:17:56.207Z”,“请求ID”: “G06LO9DH60AB9OK419826ISNJNVV4KQNSO5AEMVJF66Q9ASUAJG”,“状态代码”: 400,“retryable”:false,“retryDelay”:0,“line”:

我正在尝试读取dynamodb中我的表用户上的数据:

但是得到:

无法读取项目。错误JSON:{“消息”:“请求的资源不可用” 已找到“,”代码“:”ResourceNotFoundException“,”时间“: “2018-12-27T17:17:56.207Z”,“请求ID”: “G06LO9DH60AB9OK419826ISNJNVV4KQNSO5AEMVJF66Q9ASUAJG”,“状态代码”: 400,“retryable”:false,“retryDelay”:0,“line”:36,“column”:29583, “源URL”:“”}


我怎样才能得到这张唱片呢?

这只是一个打字错误。您使用了
table\u user
,其中表名为
table\u user

这只是一个输入错误。您使用了
table\u users
,其中表名为
table\u user

,该错误通常表示该表不存在。确认us-west-2中存在表
table\u users
。该错误通常表示该表不存在。确认us-west-2中存在表
table_users
 AWS.config.update({
  region: "us-west-2",
  endpoint: 'https://dynamodb.us-west-2.amazonaws.com/',
  // accessKeyId default can be used while using the downloadable version of DynamoDB. 
  // For security reasons, do not store AWS Credentials in your files. Use Amazon Cognito instead.
  accessKeyId: "fake",
  // secretAccessKey default can be used while using the downloadable version of DynamoDB. 
  // For security reasons, do not store AWS Credentials in your files. Use Amazon Cognito instead.
  secretAccessKey: "fake"
});

var docClient = new AWS.DynamoDB.DocumentClient();

function queryData() {
    document.getElementById('textarea').innerHTML += "Querying for movies from 1985.";

   var table = "table_users";


var title = "love";

var params = {
    TableName: table,
    Key:{
        "rawa_rese": title
    }
};

docClient.get(params, function(err, data) {
    if (err) {
        console.error("Unable to read item. Error JSON:", JSON.stringify(err, null, 2));
    } else {
        console.log("GetItem succeeded:", JSON.stringify(data, null, 2));
    }
});
}