You can now create a LambdaRuntime
with a handler that accepts an event and a context, and returns Void.
This is useful for Lambda function that don't return a value, like the one that handle messages from an SQS queues.
import AWSLambdaEvents
struct MySQSHandler: LambdaHandler {
func handle(_ event: SQSEvent, context: LambdaContext) async throws {
// Process SQS messages
}
}
let runtime = LambdaRuntime(lambdaHandler: MySQSHandler())
What's Changed
SemVer Minor
- Add initializer with LambdaHandler directly with Decodable event and Void output by @natanrolnik in #589
Full Changelog: 2.2.0...2.3.0