Skip to content

Commit a073297

Browse files
author
Or Zarchi
committed
fix: serialization errors in lambda_proxy template with single quotes
1 parent effcfd1 commit a073297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/deploy/events/apiGateway/methods.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ const LAMBDA_PROXY_REQUEST_TEMPLATE = `
6969
#set( $map = $context.authorizer )
7070
"authorizer": $loop,
7171
},
72-
"body": "$util.escapeJavaScript("$body")",
72+
"body": "$util.escapeJavaScript("$body").replaceAll("\\\\'", "'")",
7373
"isBase64Encoded": false
7474
}
7575
#end
7676
{
77-
"input": "$util.escapeJavaScript("$smInput")",
77+
"input": "$util.escapeJavaScript("$smInput").replaceAll("\\\\'", "'")",
7878
"name":"$context.requestId",
7979
"stateMachineArn":"\${StateMachineArn}"
8080
}`;

0 commit comments

Comments
 (0)