diff --git a/README.md b/README.md index a4759f1..32196f8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,15 @@ create the file to upload. All you need to do is run it: The S3 documentation has a good overview of the [restrictions for bucket names](http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) for when you start making your own buckets. +## Running the DynamoDB Local sampel + +This sample application connects to DynamoDb local [DynamoDB Local](http://aws.amazon.com/es/blogs/aws/dynamodb-local-for-desktop-development/), creates a local connection and you can do querys over the DynamoDB Local running locally. All you need to do is run it: + + node sample-dynamoDB.js + +The DynamoDb documentation you cand found in this place_ +http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html. + ## License This sample application is distributed under the diff --git a/sample-dynamoDB.js b/sample-dynamoDB.js new file mode 100644 index 0000000..04f4b4a --- /dev/null +++ b/sample-dynamoDB.js @@ -0,0 +1,30 @@ +/* + * Copyright 2013. Jesus GarcĂ­a. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +**/ + +// Load the SDK and UUID +var AWS = require('aws-sdk'); + +//Set the region +AWS.config.update({region: 'us-east-1'}); + +//Create the DynamoDB Instance +var dyn= new AWS.DynamoDB({ endpoint: new AWS.Endpoint('http://localhost:8000') }); + +//Do a query +dyn.listTables(function (err, data) +{ + console.log('listTables',err,data); +});