forked from lobo/lambda-zig
workaround payload issue
This commit is contained in:
parent
8d7d14c894
commit
daa39041b1
12
build.zig
12
build.zig
|
@ -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) && \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user