@@ -59,7 +59,7 @@ Next, create a `main.swift` and implement your Lambda.
59
59
import AWSLambdaRuntime
60
60
61
61
// in this example we are receiving and responding with strings
62
- Lambda.run { (context, payload : String , callback) in
62
+ Lambda.run { (context, payload : String , callback : @escaping (Result < String , Error > ) -> ( Void ) ) in
63
63
callback (.success (" Hello, \( payload ) " ))
64
64
}
65
65
```
@@ -81,7 +81,7 @@ Next, create a `main.swift` and implement your Lambda.
81
81
}
82
82
83
83
// In this example we are receiving and responding with `Codable`.
84
- Lambda.run { (context, request : Request, callback) in
84
+ Lambda.run { (context, request : Request, callback : @escaping (Result < Response, Error > ) -> ( Void ) ) in
85
85
callback (.success (Response (message : " Hello, \( request.name ) " )))
86
86
}
87
87
```
@@ -94,7 +94,7 @@ Next, create a `main.swift` and implement your Lambda.
94
94
import AWSLambdaEvents
95
95
96
96
// In this example we are receiving an SQS Message, with no response (Void).
97
- Lambda.run { (context, message : SQS.Message , callback) in
97
+ Lambda.run { (context, message : SQS.Message , callback : @escaping (Result < Void , Error > ) -> ( Void ) ) in
98
98
...
99
99
callback (.success (Void ()))
100
100
}
0 commit comments