Global Secondary Indexes (GSI) allow you to query efficiently over any field (attribute) in your DynamoDB table. GSIs can treat any table attribute as a key, even attributes not present in all items.
Code Name
ap-northeast-1 Asia Pacific (Tokyo)
ap-southeast-1 Asia Pacific (Singapore)
ap-southeast-2 Asia Pacific (Sydney)
eu-central-1 EU (Frankfurt)
eu-west-1 EU (Ireland)
sa-east-1 South America (Sao Paulo)
us-east-1 US East (N. Virginia)
us-west-1 US West (N. California)
us-west-2 US West (Oregon)
4.建立一個Dynamo Table
新增
varAWS=require('aws-sdk');AWS.config.update({ region:'us-west-1'});var docClient =newAWS.DynamoDB.DocumentClient();var params = { TableName:'market_item', Item: { id :'0x01', test:123 }};// Call DynamoDB to add the item to the tabledocClient.put(params,function(err, data) {if (err) {console.log("Error", err); } else {console.log("Success", data); }});