Skip to content

Commit 54fe161

Browse files
author
Stormacq, Sebastien
committed
add screenshots
1 parent 94dd096 commit 54fe161

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,27 @@ Congrats if you're still reading and if you successfully managed to create your
111111
112112
### Testing on Lambda
113113
114-
TODO : include screenshots
115-
116114
1. Connect to the AWS Lambda console
115+
116+
![lambda console](/images/lambda_console.png)
117+
117118
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+
![lambda function](/images/lambda_function.png)
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+
![test event](/images/test_event.png)
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+
![test result](/images/test_result.png)
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.
120135
121136
### Developing on XCode
122137
@@ -139,4 +154,5 @@ Here are some ideas :
139154
- Add unit tests for the framework
140155
- Split the `package_function.sh` code in two scripts, one to `package` and one to `upload`
141156
- 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``

images/lambda_function.png

276 KB
Loading

images/test_event.png

93.1 KB
Loading

images/test_result.png

104 KB
Loading

0 commit comments

Comments
 (0)