File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 66 "encoding/base64"
77 "encoding/json"
88 "fmt"
9- "io"
109 "os"
1110 "path"
1211 "time"
@@ -54,16 +53,16 @@ func (infra *AwsInfrastructure) Run(args infrastructure.InvokeArgs) {
5453func (infra * AwsInfrastructure ) invokeLambda (args interface {}) {
5554 svc := lambda .New (session .New (), infra .config )
5655
57- svc .InvokeAsync (& lambda.InvokeAsyncInput {
56+ svc .Invoke (& lambda.InvokeInput {
5857 FunctionName : aws .String ("goad" ),
59- InvokeArgs : toJSONReadSeeker (args ),
58+ Payload : toByteArray (args ),
6059 })
6160}
6261
63- func toJSONReadSeeker (args interface {}) io. ReadSeeker {
62+ func toByteArray (args interface {}) [] byte {
6463 j , err := json .Marshal (args )
6564 handleErr (err )
66- return bytes . NewReader ( j )
65+ return j
6766}
6867
6968func handleErr (err error ) {
Original file line number Diff line number Diff line change @@ -547,9 +547,9 @@ func (l *goadLambda) forkNewLambda() {
547547
548548 j , _ := json .Marshal (args )
549549
550- output , err := svc .InvokeAsync (& lambda.InvokeAsyncInput {
550+ output , err := svc .Invoke (& lambda.InvokeInput {
551551 FunctionName : aws .String ("goad" ),
552- InvokeArgs : bytes . NewReader ( j ) ,
552+ Payload : j ,
553553 })
554554 fmt .Println (output )
555555 fmt .Println (err )
You can’t perform that action at this time.
0 commit comments