Remove aws-sdk dependency

This commit is contained in:
Matheus Cansian
2019-10-15 14:21:48 -03:00
parent 39c0b08d9d
commit 0fcbe409b6
4 changed files with 41 additions and 45 deletions

View File

@@ -8,9 +8,7 @@ import {
IDataObject
} from 'n8n-workflow';
import { awsApiRequest } from './GenericFunctions';
import { Lambda } from 'aws-sdk';
import { awsApiRequestREST } from './GenericFunctions';
export class AwsLambda implements INodeType {
description: INodeTypeDescription = {
@@ -91,7 +89,7 @@ export class AwsLambda implements INodeType {
async getFunctions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
try {
var data = await awsApiRequest.call(this, 'lambda', 'GET', '/2015-03-31/functions/');
var data = await awsApiRequestREST.call(this, 'lambda', 'GET', '/2015-03-31/functions/');
} catch (err) {
throw new Error(`AWS Error: ${err}`);
}
@@ -121,8 +119,7 @@ export class AwsLambda implements INodeType {
};
try {
var responseData = await awsApiRequest.call(
var responseData = await awsApiRequestREST.call(
this,
'lambda',
'POST',