🐛 Fix AWS lambda and SNS problem with signature (#1361)

This commit is contained in:
Omar Ajoue 2021-01-20 12:23:32 +01:00 committed by GitHub
parent 13795ea321
commit 5a6b191688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ export async function awsApiRequest(this: IHookFunctions | IExecuteFunctions | I
const endpoint = new URL(getEndpointForService(service, credentials) + path); const endpoint = new URL(getEndpointForService(service, credentials) + path);
// Sign AWS API request with the user credentials // Sign AWS API request with the user credentials
const signOpts = { headers: headers || {}, host: endpoint.host, method, path: endpoint.pathname, body }; const signOpts = { headers: headers || {}, host: endpoint.host, method, path, body };
sign(signOpts, { accessKeyId: `${credentials.accessKeyId}`.trim(), secretAccessKey: `${credentials.secretAccessKey}`.trim() }); sign(signOpts, { accessKeyId: `${credentials.accessKeyId}`.trim(), secretAccessKey: `${credentials.secretAccessKey}`.trim() });