Skip to content

Commit 814b7fa

Browse files
committed
Merge branch 'main' into sebsto/docs
2 parents e33eb75 + b4f0164 commit 814b7fa

17 files changed

+13
-56
lines changed

Examples/APIGateway/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"])
1913
],

Examples/BackgroundTasks/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "BackgroundTasks", targets: ["BackgroundTasks"])
1913
],

Examples/CDK/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"])
1913
],

Examples/HelloWorld/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "MyLambda", targets: ["MyLambda"])
1913
],

Examples/S3_AWSSDK/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "AWSSDKExample",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "AWSSDKExample", targets: ["AWSSDKExample"])
1913
],

Examples/S3_Soto/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "SotoExample",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "SotoExample", targets: ["SotoExample"])
1913
],

Examples/Streaming/Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "StreamingNumbers", targets: ["StreamingNumbers"])
1913
],

readme.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
> [!IMPORTANT]
22
> The documentation included here refers to the Swift AWS Lambda Runtime v2 (code from the main branch). If you're developing for the runtime v1.x, check this [readme](https://github.com/swift-server/swift-aws-lambda-runtime/blob/v1/readme.md) instead.
33
4-
> [!WARNING]
5-
> The Swift AWS Runtime v2 is work in progress. We will add more documentation and code examples over time.
6-
74
This guide contains the follwoing sections:
85

96
- [The Swift AWS Lambda Runtime](#the-swift-aws-lambda-runtime)
@@ -40,7 +37,9 @@ Swift AWS Lambda Runtime was designed to make building Lambda functions in Swift
4037

4138
## Getting started
4239

43-
To get started, read [the Swift AWS Lambda runtime v1 tutorial](https://swiftpackageindex.com/swift-server/swift-aws-lambda-runtime/1.0.0-alpha.3/tutorials/table-of-content). It provides developers with detailed step-by-step instructions to develop, build, and deploy a Lambda function.
40+
To get started, read [the Swift AWS Lambda runtime tutorial](https://swiftpackageindex.com/swift-server/swift-aws-lambda-runtime/main/tutorials/table-of-content). It provides developers with detailed step-by-step instructions to develop, build, and deploy a Lambda function.
41+
42+
We also wrote a comprehensive [deployment guide](https://swiftpackageindex.com/swift-server/swift-aws-lambda-runtime/main/documentation/awslambdaruntimecore/deployment).
4443

4544
Or, if you're impatient to start with runtime v2, try these six steps:
4645

@@ -156,11 +155,11 @@ The `--architectures` flag is only required when you build the binary on an Appl
156155
Be sure to replace <YOUR_ACCOUNT_ID> with your actual AWS account ID (for example: 012345678901).
157156

158157
> [!IMPORTANT]
159-
> Before starting, you need the `lambda_basic_execution` IAM role in your AWS account.
158+
> Before creating a function, you need to have a `lambda_basic_execution` IAM role in your AWS account.
160159
>
161160
> You can create this role in two ways:
162161
> 1. Using AWS Console
163-
> 2. Running the commands in the `create_lambda_execution_role()` function in `Examples/_MyFirstFunction/create_iam_role.sh`
162+
> 2. Running the commands in the `create_lambda_execution_role()` function in [`Examples/_MyFirstFunction/create_iam_role.sh`](https://github.com/swift-server/swift-aws-lambda-runtime/blob/8dff649920ab0c66bb039d15ae48d9d5764db71a/Examples/_MyFirstFunction/create_and_deploy_function.sh#L40C1-L40C31)
164163
165164
6. Invoke your Lambda function
166165
@@ -280,7 +279,7 @@ try await runtime.run()
280279

281280
### Integration with Swift Service LifeCycle
282281

283-
tbd + link to docc
282+
Support for [Swift Service Lifecycle](https://github.com/swift-server/swift-service-lifecycle) is currently being implemented. You can follow https://github.com/swift-server/swift-aws-lambda-runtime/issues/374 for more details and teh current status. Your contributions are welcome.
284283

285284
### Use Lambda Background Tasks
286285

0 commit comments

Comments
 (0)