workaround payload issue

This commit is contained in:
Emil Lerch 2021-10-03 11:07:17 -07:00
parent 8d7d14c894
commit daa39041b1
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -113,15 +113,21 @@ pub fn build(b: *std.build.Builder) !void {
deploy_step.dependOn(package_step); deploy_step.dependOn(package_step);
deploy_step.dependOn(&b.addSystemCommand(&.{ "/bin/sh", "-c", cmd }).step); deploy_step.dependOn(&b.addSystemCommand(&.{ "/bin/sh", "-c", cmd }).step);
const payload = // TODO: Looks like IquanaTLS isn't playing nicely with payloads this small
\\ {"foo": "bar"}" // const payload = b.option([]const u8, "payload", "Lambda payload [{\"foo\":\"bar\"}]") orelse
// \\ {"foo": "bar"}"
// ;
const payload = b.option([]const u8, "payload", "Lambda payload [{\"foo\":\"bar\", \"baz\": \"qux\"}]") orelse
\\ {"foo": "bar", "baz": "qux"}"
; ;
const run_script = const run_script =
\\ f=$(mktemp) && \ \\ f=$(mktemp) && \
\\ logs=$(aws lambda invoke \ \\ logs=$(aws lambda invoke \
\\ --cli-binary-format raw-in-base64-out \
\\ --invocation-type RequestResponse \ \\ --invocation-type RequestResponse \
\\ --function-name {s} \ \\ --function-name {s} \
\\ --payload $(echo '{s}'|base64) \ \\ --payload '{s}' \
\\ --log-type Tail \ \\ --log-type Tail \
\\ --query LogResult \ \\ --query LogResult \
\\ --output text "$f" |base64 -d) && \ \\ --output text "$f" |base64 -d) && \