You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The project contains also some Examples:
14
14
15
15
-[HelloWorld](https://github.com/swift-sprinter/aws-lambda-swift-sprinter/blob/master/Examples/HelloWorld): A basic Lambda Swift example
16
16
-[HTTPSRequest](https://github.com/swift-sprinter/aws-lambda-swift-sprinter/blob/master/Examples/HTTPSRequest): A basic example showing how to perform an HTTPS request from the Swift Lambda using the [LambdaSwiftSprinterNioPlugin](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin)
17
-
-[S3Test](https://github.com/swift-sprinter/aws-lambda-swift-sprinter/blob/master/Examples/S3Test): A basic examle showing how to access an S3 bucket from the Swift Lambda using [https://github.com/swift-aws/aws-sdk-swift](https://github.com/swift-aws/aws-sdk-swift).
17
+
-[S3Test](https://github.com/swift-sprinter/aws-lambda-swift-sprinter/blob/master/Examples/S3Test): A basic example showing how to access an S3 bucket from the Swift Lambda using [https://github.com/swift-aws/aws-sdk-swift](https://github.com/swift-aws/aws-sdk-swift).
18
18
19
19
# Introduction
20
20
@@ -23,9 +23,9 @@ The AWS Lambdas run on [Amazon Linux](https://docs.aws.amazon.com/lambda/latest/
23
23
The work-around to build swift on Amazon Linux is achieved by:
24
24
- building the code on the [official Docker Swift](https://hub.docker.com/_/swift/)
25
25
- extracting the build and all the runtime's shared libraries
26
-
- packaging the artifacts and use them as [AWS Lambda Custom Runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html)
26
+
- packaging the artefacts and use them as [AWS Lambda Custom Runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html)
27
27
28
-
The artifacts required to run the Swift Lambda are splitted in two parts:
28
+
The artefacts required to run the Swift Lambda are split in two parts:
29
29
-[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html): A layer is a ZIP archive that contains libraries, a custom runtime, all the shared libraries required to run the Swift lambda.
30
30
- Lambda code depends on the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework: A zip package containing the Swift Lambda main executable and third-party libraries.
31
31
@@ -131,7 +131,7 @@ Refer to the [LambdaSwiftSprinter framework documentation](https://github.com/sw
131
131
132
132
#### 5) Build the lambda
133
133
134
-
By default the `Makefile` will build the `HelloWorld` example contained in this repository.
134
+
By default, the `Makefile` will build the `HelloWorld` example contained in this repository.
135
135
136
136
The following command will build and zip the Lambda:
137
137
@@ -144,7 +144,7 @@ The output of this command is a ZIP file called `lambda.zip` under the folder `.
144
144
145
145
## Parametrized calls / Automation
146
146
147
-
Can pass values to your `make` command either before or after the call like below. This will fit better in a script per example to setup continuous integration in your project.
147
+
Can pass values to your `make` command either before or after the call like below. This will fit better in a script per example to set up continuous integration in your project.
148
148
149
149
### Before `make`
150
150
@@ -182,7 +182,7 @@ make invoke_lambda \
182
182
183
183
## Manual change
184
184
185
-
You can also edit the `Makefile` to build a different Example by commenting the following lines and uncommenting the line relateted to the example you want to build.
185
+
You can also edit the `Makefile` to build a different Example by commenting the following lines and uncommenting the line related to the example you want to build.
The folowing tutorial describes how to deploy the lambda in your AWS account from the command line using [AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) through the `Makefile`.
199
+
The following tutorial describes how to deploy the lambda in your AWS account from the command line using [AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) through the `Makefile`.
200
200
201
201
The goal of the deployment is to create and configure a lambda with `lambda.zip` and the layer with `swift-lambda-runtime.zip`.
-```$LOCAL_LAMBDA_PATH```: the path containing the build
378
378
-```$SHARED_LIBS_FOLDER```: the path containing the extracted swift runtime libraries
379
379
-```$LAMBDA_HANDLER```: the lambda handler
380
-
-```$LOCAL_LAMBDA_EVENT```: the event json string
380
+
-```$LOCAL_LAMBDA_EVENT```: the event JSON string
381
381
382
382
383
383
To run the Lambda locally follow the [Lambda development workflow](https://github.com/swift-sprinter/aws-lambda-swift-sprinter#lambda-development-workflow) to the step 4:
@@ -403,7 +403,7 @@ Invoke the Lambda locally once with Docker and LambCI on port ```9001```
403
403
404
404
```make invoke_lambda_local_once```
405
405
406
-
### Start lamba local environment
406
+
### Start lambda local environment
407
407
408
408
Start the local environment with Docker and LambCI on port ```9001```
409
409
@@ -421,9 +421,9 @@ Invoke the lambda locally using the endpoint ```http://localhost:9001``` with th
421
421
422
422
## Use of Docker Compose
423
423
424
-
To test lambda locally with more complex environment it's possible to use Docker Compose.
424
+
To test lambda locally with a more complex environment it's possible to use Docker Compose.
425
425
426
-
All the examples in the repository have their own```docker-compose.yml``` file to run the example locally listening on the port ```9001```.
426
+
All the examples in the repository have ```docker-compose.yml``` file to run the example locally listening on the port ```9001```.
427
427
428
428
### Start the Docker Compose
429
429
@@ -451,9 +451,9 @@ Stop the docker-compose test environment
451
451
- Clone the repo `git clone https://github.com/swift-sprinter/aws-lambda-swift-sprinter.git`
452
452
453
453
### Build:
454
-
- From command line run `make docker_build`
455
-
- From command line run `make package_layer`
456
-
- From command line run `make package_lambda`
454
+
- From the command line run `make docker_build`
455
+
- From the command line run `make package_layer`
456
+
- From the command line run `make package_lambda`
457
457
458
458
### Configure:
459
459
- Go to `AWS Lambda -> Layers` in AWS Console and create a new layer from scratch
0 commit comments