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 Jul 14, 2020. It is now read-only.
- Made sure everything compiles with Swift 5.2
- Updated documentation
Co-authored-by: Antonio Favata <[email protected]>
Co-authored-by: Antonio Favata <[email protected]>
@@ -65,7 +65,7 @@ This should help you to get started with Swift on AWS Lambda. The focus is prima
65
65
66
66
*Note: The following instructions were recorded on 19.12.2019 and the GUI may have changed since then. Feel free to start an issue if you see a different one.*
67
67
68
-
The Swift version used here is `5.1.3`. You can look up available versions of Swift on Amazonlinux [here](https://fabianfett.de/amazonlinux-swift). You may want to use a later version if that works for you!
68
+
The Swift version used here is `5.2.1`. You can look up available versions of Swift on Amazonlinux [here](https://fabianfett.de/amazonlinux-swift). You may want to use a later version if that works for you!
69
69
70
70
### Step 1: Develop your lambda
71
71
@@ -82,7 +82,7 @@ The easiest way to go forward from here is to drag the newly created `Package.sw
82
82
Next, we will need to include the `LambdaRuntime` and `SwiftNIO` as dependencies. For that open the `Package.swift` and modify it so that it looks like this:
83
83
84
84
```swift
85
-
// swift-tools-version:5.1
85
+
// swift-tools-version:5.2
86
86
// The swift-tools-version declares the minimum version of Swift required to build this package.
$ docker run --rm --volume "$(pwd)/:/src" --workdir "/src/" lambda-swift-dev:5.1.3 swift build -c release
171
+
$ docker run --rm --volume "$(pwd)/:/src" --workdir "/src/" lambda-swift-dev:5.2.1 swift build -c release
169
172
```
170
173
171
174
This will create a `SquareNumber` executable in your `./build/release` folder. Let's grab the executable and rename it to `bootstrap`.
@@ -190,7 +193,7 @@ You'll see a screen that looks like this.
190
193
191
194

192
195
193
-
First we need to select our Swift runtime. We do so by clicking "Layers" below the function name in the center of the screen. The lower part of the screen changes and we can see an "Add Layer" button in the center. Let's click that button. On the next screen we need to select "Provide a layer version ARN" and there we enter the ARN that fits the Swift version that we've used to compile. For Swift `5.1.3` this is `arn:aws:lambda:<region>:426836788079:layer:Swift:8`. Do not forget to replace `<region>` with the AWS region identifier you operate in. Next we click "Add".
196
+
First we need to select our Swift runtime. We do so by clicking "Layers" below the function name in the center of the screen. The lower part of the screen changes and we can see an "Add Layer" button in the center. Let's click that button. On the next screen we need to select "Provide a layer version ARN" and there we enter the ARN that fits the Swift version that we've used to compile. For Swift `5.2.1` this is `arn:aws:lambda:<region>:426836788079:layer:Swift:12`. Do not forget to replace `<region>` with the AWS region identifier you operate in. Next we click "Add".
194
197
195
198

0 commit comments