People, I can make a simple SES call:
var Promise = require("bluebird");
var AWS = require('aws-sdk');
var SES = new AWS.SES();
SES.listVerifiedEmailAddresses(function (err, emails) {
console.log(err,emails);
});
However, when I try to use bluebird, I get the following:
var Promise = require("bluebird");
var AWS = require('aws-sdk');
var SES = new AWS.SES();
var ses = Promise.promisifyAll(Object.getPrototypeOf(SES));
ses.listVerifiedEmailAddressesAsync().then(function (err,emails) {
console.log('p',err,emails);
});
Error:
Unhandled rejection TypeError: Cannot read property 'params' of undefined
So how can you promise aws-sdk via bluebird? You need to have the returnresults of successful promises.
Thank!
source
share