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
cd build && zip function.zip bootstrap && rm bootstrap &&cd ..
30
-
```
30
+
```
31
+
32
+
## AWS Lambda Console
33
+
34
+
In the AWS Lambda console select `Create function` and give your function a name,
35
+
e.g. `myHaskellLambda`, and for the runtime select `'Provide your own bootstrap'`.
36
+
<P>
37
+
Inside your function configuration, select `'Upload a .zip file'` for code entry type.
38
+
Select the `function.zip` in the Function package. Change the Handler
39
+
to `src/Lib.handler`.
40
+
<P>
41
+
Remember to select `Save` to save your configuration.
42
+
<P>
43
+
Next to the Test button select `'Configure test events'` and use the following JSON for
44
+
a successful test.
45
+
46
+
```
47
+
{
48
+
"personName": "Bobby",
49
+
"personAge": 21
50
+
}
51
+
```
52
+
53
+
For a test which captures the error and results in a failure use the following JSON.
54
+
55
+
```
56
+
{
57
+
"personName": "Bobby",
58
+
"personAge": -1
59
+
}
60
+
```
61
+
After selecting the test you wish to run and pressing `Test` you will see the resul in the `Execution result` area. For successful execution the returned data will be the same as the input.
62
+
<P>
63
+
In the failure case the returned data will be `'A person's age must be positive'`.
64
+
<P>
65
+
Congratulations you have ran your first AWS Lambda using the Haskell runtime!
0 commit comments