Skip to content

Commit 1999660

Browse files
committed
fix typos and errors
1 parent 32005a2 commit 1999660

File tree

7 files changed

+30
-21
lines changed

7 files changed

+30
-21
lines changed

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-03-package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ let package = Package(
99
.macOS(.v12),
1010
],
1111
dependencies: [
12-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from:"1.0.0")),
12+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from: "1.0.0-alpha")),
1313
],
14-
)
14+
)

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-04-package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ let package = Package(
1212
.executable(name: "SquareNumberLambda", targets: ["SquareNumberLambda"]),
1313
],
1414
dependencies: [
15-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from:"1.0.0")),
15+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from: "1.0.0-alpha")),
1616
],
17-
)
17+
)

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-05-package.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ let package = Package(
1212
.executable(name: "SquareNumberLambda", targets: ["SquareNumberLambda"]),
1313
],
1414
dependencies: [
15-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from:"1.0.0")),
15+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from: "1.0.0-alpha")),
1616
],
1717
targets: [
1818
.executableTarget(
1919
name: "SquareNumberLambda",
2020
dependencies: [
2121
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
22-
]
22+
],
23+
path: "."
2324
),
2425
]
25-
)
26+
)

Sources/AWSLambdaRuntimeCore/Documentation.docc/quick-setup.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ For a detailed step-by-step instruction, follow the tutorial instead.
88

99
<doc:/tutorials/table-of-content>
1010

11-
For the impatients, keep reading.
11+
For the impatient, keep reading.
1212

1313
## High-level instructions
1414

1515
Follow these 6 steps to write, test, and deploy a Lambda function in Swift.
1616

17-
1. Create a Swift project for an execyutable target
17+
1. Create a Swift project for an executable target
1818

1919
```sh
2020
swift package init --type executable
@@ -23,23 +23,29 @@ swift package init --type executable
2323
2. Add dependencies on `AWSLambdaRuntime` library
2424

2525
```swift
26+
// swift-tools-version:5.8
27+
// The swift-tools-version declares the minimum version of Swift required to build this package.
28+
29+
import PackageDescription
30+
2631
let package = Package(
2732
name: "YourProjetName",
2833
platforms: [
2934
.macOS(.v12),
3035
],
3136
products: [
3237
.executable(name: "YourFunctionName", targets: ["YourFunctionName"]),
33-
],
38+
],
3439
dependencies: [
35-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from:"1.0.0")),
40+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", .upToNextMajor(from: "1.0.0-alpha")),
3641
],
3742
targets: [
3843
.executableTarget(
3944
name: "YourFunctionName",
4045
dependencies: [
4146
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
42-
]
47+
],
48+
path: "."
4349
),
4450
]
4551
)

Sources/AWSLambdaRuntimeCore/Documentation.docc/tutorials/02-what-is-lambda.tutorial

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
Lambda is an ideal compute service for many application scenarios, as long as you can run your application code using the Lambda [standard runtime environment](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html and within the resources that Lambda provides. For example, you can use Lambda for:
1515

16-
- Mobile backends: Build backends using Lambda and Amazon API Gateway to authenticate and process API requests. Use AWS Amplify to easily integrate your backend with your iOS, Android, Web, and React Native frontends.
16+
- Mobile backends: Build backends using Lambda and Amazon API Gateway to authenticate and process API requests. Use AWS Amplify to easily integrate your backend with your iOS, Android, Web, and React Native front ends.
1717

1818
- Web applications: Combine Lambda with other AWS services to build powerful web applications that automatically scale up and down and run in a highly available configuration across multiple data centers.
1919

2020
- File processing: Use Amazon Simple Storage Service (Amazon S3) to trigger Lambda data processing in real time after an upload.
2121

22-
- Stream processing: Use Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, clickstream analysis, data cleansing, log filtering, indexing, social media analysis, Internet of Things (IoT) device data telemetry, and metering.
22+
- Stream processing: Use Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, click stream analysis, data cleansing, log filtering, indexing, social media analysis, Internet of Things (IoT) device data telemetry, and metering.
2323

2424
- IoT backends: Build serverless backends using Lambda to handle web, mobile, IoT, and third-party API requests.
2525

Sources/AWSLambdaRuntimeCore/Documentation.docc/tutorials/03-write-function.tutorial

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
In the Xcode editor, replace the content of `Package.swift` with the file on the right side of the screen.
5353

5454
It defines a package for a project named `SquareNumberLambda`. The package name only matters when you build a library that is used by other Swift packages.
55+
56+
> Comments are important here, do not skip them. They define the minimum version of Swift to use.
5557
@Code(name: "Package.swift", file: 03-02-01-package.swift)
5658
}
5759
@Step {
@@ -86,7 +88,7 @@
8688

8789
@Section(title: "Write the function code") {
8890
@ContentAndMedia() {
89-
Now that our project structure is ready, let's write the code of your Lambda function. Perform the follwoing steps in Xcode or another IDE of your choice.
91+
Now that our project structure is ready, let's write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice.
9092

9193
@Image(source: 03-03-swift-code-xcode, alt: "Swift code in Xcode")
9294
}

Sources/AWSLambdaRuntimeCore/Documentation.docc/tutorials/04-deploy-function.tutorial

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929

3030
@Step {
31-
The plugin starts a Docker container running Amazon Linux 2 and compile your Lambda function code. It then creates a zip file. When everything goes well, you should see an ouput similar to this one.
31+
The plugin starts a Docker container running Amazon Linux 2 and compile your Lambda function code. It then creates a zip file. When everything goes well, you should see an output similar to this one.
3232

3333
@Code(name: "Commands in a Terminal", file: 04-01-03-plugin-archive.sh)
3434
}
@@ -65,7 +65,7 @@
6565
}
6666

6767
@Step {
68-
On the top right side of the console, select the AWS Region where you want to deploy your Lambda function. You typically choose a Region close to your customers to minimize the network latency. For thsi demo, I selected **Oregon (us-west-2)**
68+
On the top right side of the console, select the AWS Region where you want to deploy your Lambda function. You typically choose a Region close to your customers to minimize the network latency. For this demo, I selected **Oregon (us-west-2)**
6969

7070
> AWS has multiple Regions across all continents. You can learn more about [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) here.
7171

@@ -94,19 +94,19 @@
9494
}
9595

9696
@Step {
97-
On the next screen, select **.zip file** from the **Upload from** selection.
97+
On the next screen, select **.zip file** from the **Upload from** selection box on the middle right part of the screen.
9898

9999
@Image(source: 04-02-07-upload-zip.png, alt: "Upload ")
100100
}
101101

102102
@Step {
103-
I select the zip file that was generated earlier and select **Save**.
103+
Select the zip file that was generated earlier and select **Save**.
104104

105105
@Image(source: 04-02-08-upload-zip.png, alt: "Create function")
106106
}
107107

108108
@Step {
109-
To verify everything works well, I create a test event and invoke the function from the **Test** tab in the console. I enter `MyTestEvent` as **Event name**. I enter `{"number":3}` as **Event JSON**. Then I select **Test**.
109+
To verify everything works well, create a test event and invoke the function from the **Test** tab in the console. Enter `MyTestEvent` as **Event name**. Enter `{"number":3}` as **Event JSON**. Then, select **Test**.
110110

111111
@Image(source: 04-02-09-test-lambda.png, alt: "Create function")
112112
}
@@ -164,7 +164,7 @@
164164

165165
}
166166
@Step {
167-
When everythign goes well, you will see `{ "result" : 9}`. Congratulation 🎉 !
167+
When everything goes well, you will see `{ "result" : 9}`. Congratulation 🎉 !
168168

169169
@Code(name: "Command to type in the Terminal", file: 04-03-05-lambda-invoke.sh)
170170

0 commit comments

Comments
 (0)