简体   繁体   English

DynamoDB Local抛出了http 400错误请求

[英]DynamoDB Local throws http 400 bad request

I am trying to run dynamo db local released by AWS a week ago through .net sample provided by amazon. 我试图在一周前通过亚马逊提供的.net示例运行AWS发布的dynamo db local。

 AmazonDynamoDBConfig config = new AmazonDynamoDBConfig();
 config.ServiceURL = "http://localhost:8000";
 client = new AmazonDynamoDBClient(config);

 Console.WriteLine();
 Console.WriteLine("Creating sample tables");
 CreateSampleTables();



 public static void CreateSampleTables()
 {
    Console.WriteLine("Getting list of tables");
    //This line throws error
    List<string> currentTables = client.ListTables().ListTablesResult.TableNames; 

Exception of type 'Amazon.DynamoDB.AmazonDynamoDBException' was thrown. 抛出了“Amazon.DynamoDB.AmazonDynamoDBException”类型的异常。

Inner exception: {"The remote server returned an error: (400) Bad Request."}

I tried to call localhost:8000 using the browser, and I get the same error 我尝试使用浏览器调用localhost:8000,我得到了同样的错误

This error (HTTP 400 Bad Request) means that Internet Explorer was able to connect to the web server, but the webpage could not be found because of a problem with the address. 此错误(HTTP 400错误请求)表示Internet Explorer能够连接到Web服务器,但由于地址有问题,无法找到网页。

Any help would be greatly appreciated! 任何帮助将不胜感激!

Without seeing all your code, my initial guess is that you are still using the Amazon.DynamoDB namespace and not the Amazon.DynamoDBv2 namespace. 在没有看到所有代码的情况下,我最初的猜测是您仍在使用Amazon.DynamoDB命名空间而不是Amazon.DynamoDBv2命名空间。 The Amazon DynamoDB Local tool only supports the latest DynamoDB API. Amazon DynamoDB Local工具仅支持最新的DynamoDB API。

Thanks! 谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM