Reputation: 13
I am trying to run dynamo db local released by AWS a week ago through .net sample provided by amazon.
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.
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
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.
Any help would be greatly appreciated!
Upvotes: 1
Views: 2286
Reputation: 4420
Without seeing all your code, my initial guess is that you are still using the Amazon.DynamoDB namespace and not the Amazon.DynamoDBv2 namespace. The Amazon DynamoDB Local tool only supports the latest DynamoDB API.
Thanks!
Upvotes: 2