You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bringcloud;letfn=newcloud.Function(inflight(e)=>{assert(Json.tryParse(e)?.get("foo")?.asNum()==123);});test"send a json object to function"{fn.invoke(Json.stringify({foo: 123}));}
This works in the simulator.
Now, deploy to AWS:
wing compile -t tf-aws
cd target/main.tfaws
terraform init
terraform apply
I tried this:
This works in the simulator.
Now, deploy to AWS:
wing compile -t tf-aws cd target/main.tfaws terraform init terraform apply
Now, let's try to call invoke this function:
aws lambda invoke --function-name Function-c852aba6 --payload $(echo '{ "foo": 123 }' | base64) out.json
This happened:
I expected this:
I kind of expected this to work, although I can understand why this doesn't work.
There's a discrepancy between the APIs of Lambda and
cloud.Function
wherecloud.Function
handlers arestr
and at AWS they are JSON values.Is there a workaround?
No response
Anything else?
I think the right solution on Wing's end is to change the signature of
cloud.Function
's handle to acceptJson?
as the input (and output).This seems like the safest thing to do.
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
The text was updated successfully, but these errors were encountered: