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
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,12 +111,27 @@ Congrats if you're still reading and if you successfully managed to create your
111
111
112
112
### Testing on Lambda
113
113
114
-
TODO : include screenshots
115
-
116
114
1. Connect to the AWS Lambda console
115
+
116
+

117
+
117
118
2. Click on "Functions" on the left, then on the name of the function that has been created just before (``SwiftLambdaHelloWorld`` if you did not change the default)
118
-
3. Click on "TEST"... to prepare a dummy payload
119
-
4. Click on "TEST" and observe the results
119
+
120
+

121
+
122
+
3. Open the "Select a test event" drop down and click on "Configure test events" to prepare a dummy payload.
123
+
124
+
- Enter a simple JSON with ``"key1"`` as key name and any value.
125
+
- Enter a name for your test event, such as ``testevent``
126
+
- Click "Save" at the bottom of the screen
127
+
128
+

129
+
130
+
4. Click on "TEST" to invoke your Swift based Lambda function. When everything works well, you should see a green screen looking like this :
131
+
132
+

133
+
134
+
If you receive an error message, do not throw away your laptop immediately. Usually, reading the error message will give you a clue of what went wrong.
120
135
121
136
### Developing on XCode
122
137
@@ -139,4 +154,5 @@ Here are some ideas :
139
154
- Add unit tests for the framework
140
155
- Split the `package_function.sh` code in two scripts, one to `package` and one to `upload`
141
156
- Create two distinct Swift project, one for the runtime and one for your Lambda function
142
-
- Package the Swift RunTime as a shared library and in a distinct Lambda layer for reuse across multiple functions.
157
+
- Package the Swift RunTime as a shared library and in a distinct Lambda layer for reuse across multiple functions.
158
+
- Allow the handler to make an HTTPS call. Swift's implementation relies on ``libgnutls`` which expects to find its root certificates in ``/etc/ssl/certs/ca-certificates.crt`` directory. That directory is absent on Amazon Linux. **Currently calls to HTTPS endpoint will fail with an error** : ``error setting certificate verify locations:\n CAfile: /etc/ssl/certs/ca-certificates.crt\n CApath: /etc/ssl/certs``
0 commit comments