Skip to content

Commit

Permalink
Update quick-setup.md (#451)
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
sebsto authored Jan 3, 2025
1 parent eb9512d commit 430af04
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ swift package init --type executable
2. Add dependencies on `AWSLambdaRuntime` library

```swift
// swift-tools-version:5.8
// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down Expand Up @@ -53,9 +53,7 @@ let package = Package(

3. Write your function code.

> Be sure to rename the `main.swift` file to something else.
Create an instance of `LambdaRuntime` and pass as a closure a function with this signature: `(_ : Event, context: LambdaContext) async throws -> Output` (as defined in the `LambdaHandler` protocol). `Event` must be `Decodable`.
Create an instance of `LambdaRuntime` and pass a function as a closure. The function has this signature: `(_: Event, context: LambdaContext) async throws -> Output` (as defined in the `LambdaHandler` protocol). `Event` must be `Decodable`. `Output` must be `Encodable`.

If your Lambda function is invoked by another AWS service, use the `AWSLambdaEvent` library at [https://github.com/swift-server/swift-aws-lambda-events](https://github.com/swift-server/swift-aws-lambda-events) to represent the input event.

Expand Down

0 comments on commit 430af04

Please sign in to comment.