cloudwatch-custom

1.0.0 • Public • Published

Install

$ npm install --save cloudwatch-custom

Usage

var CloudWatchData = require('cloudwatch-custom');

var aws = {
    region          : 'us-east-1',
    accessKeyId     : 'your-key',
    secretAccessKey : 'your-secret',
};

var cloudwatch = new CloudWatchData(aws, 'your-namespace');

// track some metrics
cloudwatch.increment('user-created');
cloudwatch.increment('ios-push');

// send to cloudwatch every 5 minutes
new CronJob('0 */5 * * * *', function() {
    cloudwatch
        .send()
        .then(function (data) {
            console.log(data);
        })
        .catch(function (err) {
            console.log(err);
        });
}, null, true);

License

MIT

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i cloudwatch-custom

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • alex101