Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aws Sdk V3 #206

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions common/checksum/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let leo = require("leo-sdk");
const aws = require("aws-sdk");
const { Lambda } = require("@aws-sdk/client-lambda");
const checksum = require("./lib/checksumNibbler.js");
const leoaws = require('leo-aws');
let cron = leo.bot;
Expand Down Expand Up @@ -271,17 +271,18 @@ module.exports = {
lastUpdate: moment.now(),
status: status,
statusReason: err ? err.toString() : stopReason
})).then(result => {
async.parallel(tasks, (err, data) => {
if (err) {
reject(err);
} else {
resolve(session);
}
}))
.then(result => {
async.parallel(tasks, (err, data) => {
if (err) {
reject(err);
} else {
resolve(session);
}
});
}, err => {
reject(err);
});
}, err => {
reject(err);
});
});
});
}, logError);
Expand All @@ -290,7 +291,7 @@ module.exports = {
},
lambdaConnector: function(id, lambdaName, settings) {
let region = (lambdaName.match(/arn:aws:lambda:(.*?):/) || [])[1];
const lambdaInvoker = new aws.Lambda({
const lambdaInvoker = new Lambda({
region: region || this.configuration._meta.region,
credentials: this.configuration ? this.configuration.credentials : null
});
Expand Down Expand Up @@ -567,7 +568,7 @@ module.exports = {
let session = null;

function invoke(method, func) {
func = func || ((d) => {});
func = func || ((d) => { });
return (data) => {
return new Promise((resolve, reject) => {
//logger.log(method, data)
Expand Down
Loading