fix(awsLambda Node): fix json data being sent to AWS Lambda as string (#4029)

Fix AWS lamba by not sending json as string
This commit is contained in:
Jonathan Bennetts 2022-09-06 09:01:48 +01:00 committed by GitHub
parent d554128457
commit c28f69b276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,3 @@
import { URL } from 'url';
import { Request, sign } from 'aws4';
import { OptionsWithUri } from 'request';
import { parseString as parseXml } from 'xml2js';
import {
@ -10,7 +7,7 @@ import {
IWebhookFunctions,
} from 'n8n-core';
import { ICredentialDataDecryptedObject, IHttpRequestOptions, NodeApiError, NodeOperationError } from 'n8n-workflow';
import { IHttpRequestOptions, NodeApiError } from 'n8n-workflow';
export async function awsApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
@ -28,7 +25,7 @@ export async function awsApiRequest(
path,
},
method,
body: JSON.stringify(body),
body: service === 'lambda' ? body : JSON.stringify(body),
url: '',
headers,
region: credentials?.region as string,