1.0.4 • Published 4 years ago
sails-hook-aws v1.0.4
Sails Hook AWS
Simple configuration and communication with AWS API in sails.
Getting Started
Install it via npm:
npm install sails-hook-aws --save
Configure config/aws.js
in your project:
module.exports.aws = {
// example
accessKeyId: '',
secretAccessKey: '',
// ...
ssm: {
region: 'eu-west-1',
// ...
},
sns: {
region: 'eu-central-1',
// ...
},
};
Config is for aws-sdk.
Available methods
Executing methods with auto initialization:
sails.hooks.aws.service().method(params, function (err, data) {
// process
});
or with promise
sails.hooks.aws.service().method(params).promise()
.then(function (data) {
// process
})
All methods of all services in the official documentation.
Example
sails.hooks.aws.SES().cloneReceiptRuleSet(params).promise()
.then(function (data) {
// process
})