Skip to content

Commit ce057d0

Browse files
committed
Merge branch 'main' into sebsto/localserver
2 parents 2397b00 + c22f527 commit ce057d0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Examples/HelloJSON/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Hello JSON
22

3-
This is a simple example of an AWS Lambda function that takes a JSON structure as input parameter and returns a JSON structure as response.
3+
This is a simple example of an AWS Lambda function that takes a JSON structure as an input parameter and returns a JSON structure as a response.
44

55
The runtime takes care of decoding the input and encoding the output.
66

77
## Code
88

9-
The code defines a `HelloRequest` and `HelloResponse` data structure to represent the input and outpout payload. These structures are typically shared with a client project, such as an iOS application.
9+
The code defines `HelloRequest` and `HelloResponse` data structures to represent the input and output payloads. These structures are typically shared with a client project, such as an iOS application.
1010

11-
The code creates a `LambdaRuntime` struct. In it's simplest form, the initializer takes a function as argument. The function is the handler that will be invoked when an event triggers the Lambda function.
11+
The code creates a `LambdaRuntime` struct. In it's simplest form, the initializer takes a function as an argument. The function is the handler that will be invoked when an event triggers the Lambda function.
1212

1313
The handler is `(event: HelloRequest, context: LambdaContext)`. The function takes two arguments:
1414
- the event argument is a `HelloRequest`. It is the parameter passed when invoking the function.
1515
- the context argument is a `Lambda Context`. It is a description of the runtime context.
1616

17-
The function return value will be encoded to an `HelloResponse` as your Lambda function response.
17+
The function return value will be encoded to a `HelloResponse` as your Lambda function response.
1818

1919
## Build & Package
2020

Examples/HelloJSON/Sources/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import AWSLambdaRuntime
1616

17-
// in this example we are receiving and responding with a JSON structure
17+
// in this example we are receiving and responding with JSON structures
1818

1919
// the data structure to represent the input parameter
2020
struct HelloRequest: Decodable {

Examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This directory contains example code for Lambda functions.
1818

1919
- **[BackgroundTasks](BackgroundTasks/README.md)**: a Lambda function that continues to run background tasks after having sent the response (requires [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)).
2020

21-
- **[HelloJSON](HelloJSON/README.md)**: a Lambda function that accepts a JSON as input parameter and responds with a JSON output (requires [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)).
21+
- **[HelloJSON](HelloJSON/README.md)**: a Lambda function that accepts JSON as an input parameter and responds with a JSON output (requires [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)).
2222

2323
- **[HelloWorld](HelloWorld/README.md)**: a simple Lambda function (requires [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)).
2424

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ This should print
148148
149149
### Receive and respond with JSON objects
150150
151-
Typically, your Lambda functions will receive an input parameter expressed as JSON and will respond with another JSON. The Swift AWS Lambda runtime automatically takes care of encoding and decoding JSON objects when your Lambda function handler accepts `Decodable` and returns `Encodable` conforming `struct`.
151+
Typically, your Lambda functions will receive an input parameter expressed as JSON and will respond with some other JSON. The Swift AWS Lambda runtime automatically takes care of encoding and decoding JSON objects when your Lambda function handler accepts `Decodable` and returns `Encodable` conforming types.
152152
153153
Here is an example of a minimal function that accepts a JSON object as input and responds with another JSON object.
154154
@@ -220,7 +220,7 @@ You can learn how to deploy and invoke this function in [the streaming example R
220220

221221
### Integration with AWS Services
222222

223-
Most Lambda functions are triggered by events originating in other AWS services such as `Amazon SNS`, `Amazon SQS` or `AWS APIGateway`.
223+
Most Lambda functions are triggered by events originating in other AWS services such as Amazon SNS, Amazon SQS or AWS APIGateway.
224224

225225
The [Swift AWS Lambda Events](http://github.com/swift-server/swift-aws-lambda-events) package includes an `AWSLambdaEvents` module that provides implementations for most common AWS event types further simplifying writing Lambda functions.
226226

0 commit comments

Comments
 (0)