Initialize connection to DynamoDB
options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection
ddb = DynamoDB.new(
:aws_access_key_id => your_aws_access_key_id,
:aws_secret_access_key => your_aws_secret_access_key
)
Get DynamoDB items
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
request_items has form:
{"table_name"=>
[{"PutRequest"=>
{"Item"=>
{"hi" => {"N" => 99}}
}
}]
}
See DynamoDB Documentation: docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_BatchWriteItems.html
Create DynamoDB table
* 'AttributeName'<~String> - name of attribute
* 'KeyType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
* 'AttributeName'<~String> - name of attribute
* 'KeyType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html
Delete DynamoDB item
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html
Delete DynamoDB table
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteTable.html
Describe DynamoDB table
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html
Get DynamoDB item
{
"ForumName": {
"S": "Amazon DynamoDB"
}
}
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html
List DynamoDB tables
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ListTables.html
Update DynamoDB item
"LastPostDateTime": {"S": "201303190422"}
}
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html
Query DynamoDB items
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
Scan DynamoDB items
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html
Update DynamoDB item
"ForumName": {"S": "Amazon DynamoDB"},
"Subject": {"S": "Maximum number of items?"}
}
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html
Update DynamoDB table throughput
* 'AttributeName'<~String> - name of attribute
* 'KeyType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
See DynamoDB Documentation: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html