Skip to content

Commit 917a3bb

Browse files
author
Nick Tchayka
authored
Merge pull request #68 from LazyBrush/master
Documentation: Added AWS console instructions
2 parents 62bde28 + 4c47fc2 commit 917a3bb

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

doc/06-deploying-a-lambda.md

100755100644
Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,39 @@ cp $(stack --docker path --local-install-root)/bin/bootstrap build
2727

2828
# Create a `function.zip` file to upload
2929
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

Comments
 (0)