Reputation: 10864
I have following code written in DynamoDB for table creation. I am running this with Eclise. I have configured Tomcat server. I deployed my app on Tomcat and open the localhost URL.
DynamoDB dynamoDB = new DynamoDB(dynamo);
ArrayList<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>();
attributeDefinitions.add(new AttributeDefinition()
.withAttributeName("Id").withAttributeType("N"));
ArrayList<KeySchemaElement> keySchema = new ArrayList<KeySchemaElement>();
keySchema.add(new KeySchemaElement().withAttributeName("Id")
.withKeyType(KeyType.HASH));
CreateTableRequest request1 = new CreateTableRequest()
.withTableName("abcdef")
.withKeySchema(keySchema)
.withAttributeDefinitions(attributeDefinitions)
.withProvisionedThroughput(new ProvisionedThroughput()
.withReadCapacityUnits(5L)
.withWriteCapacityUnits(6L));
System.out.println("Issuing CreateTable request for abcde");
Table table = dynamoDB.createTable(request1);
System.out.println("Waiting for abcde to be created...this may take a while...");
table.waitForActive();
It runs successfully. It also shows the table created successfully. But when I open Amazon DynamoDB console, it does not reflect the newly created table. Can anyone suggest me what goes wrong here ? I have properly configured secretKey and accessKey.
Upvotes: 3
Views: 998
Reputation: 64
Could it be a different region where the tables created and the console shows?
Upvotes: 5