0.0.34 • Published 11 years ago

plata v0.0.34

Weekly downloads
142
License
-
Repository
github
Last release
11 years ago

Plata

Plata is an easy-to-use AWS client for node that supports a consistent API across AWS services.

Currently Supported Services

  • CloudSearch
  • CloudWatch
  • SQS
  • SES
  • SNS
  • EC2 (minimal)

Usage

S3

var aws = require('aws'),
    fs = require('fs'),
    sequence = require('sequence');

aws.connect();

sequence(aws).then(function(next){
        fs.readFile('dan-queue.json', 'utf-8', next);
    }).then(function(next, err, data){
        aws.s3.putObject("queue.extension.fm", "dan.json", data).then(
            function(response){
                console.log('Dan's queue updated on S3');
            },
            function(err){
                console.error(err);
            }
        );
    }
);

CloudSearch

var aws = require('node-aws');
aws.connect();

function addDocs(){
    var docClient = aws.cs.getSearchClient('doc-yourCloudsearchEndpoint>');
    docClient.add('1', '1', {'username': 'dan', 'location': 'New York, NY'});
    docClient.add('2', '1', {'username': 'danielle', 'location': 'Budapest, HU'});

    docClient.commit().then(
        function(result){
            console.log(result);
            searchByUsername('dan*');
        },
        function(err){
            console.error(err);
        }
    );
}

function searchByUsername(username){
    var searchClient = aws.cs.getSearchClient('search-yourCloudsearchEndpoint>');
    searchClient.search({
        'q': 'field username: '+username,
        'returnFields': ['username']}
    ).then(function(result){
        console.log('Results found: '+result.hits);
        console.log('Results: '+result.docs);
    }, function(err){
        console.error(err);
    });
}

aws.cs.createDomain().then(addDocs);

TODO

  • Finish high level interfaces for existing services
  • EMR support
  • STS support
  • DynamoDB support
  • Simple Workflow support
0.0.34

11 years ago

0.0.33

11 years ago

0.0.32

11 years ago

0.0.31

11 years ago

0.0.30

11 years ago

0.0.29

11 years ago

0.0.28

11 years ago

0.0.27

11 years ago

0.0.26

11 years ago

0.0.25

11 years ago

0.0.24

11 years ago

0.0.23

11 years ago

0.0.22

11 years ago

0.0.21

11 years ago

0.0.20

11 years ago

0.0.19

11 years ago

0.0.18

11 years ago

0.0.17

11 years ago

0.0.16

11 years ago

0.0.15

11 years ago

0.0.14

11 years ago

0.0.13

11 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago