File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
AWS Lambda which function as a brdge between custom events and MQTT Broker.
4
4
5
+ ### Dependencies
6
+
7
+ - AWS account
8
+ - http://aws.amazon.com/
9
+ - AWS Lambda service is currently in preview, so you need to be whitelisted to use it:
10
+ - http://aws.amazon.com/lambda/
11
+ - AWS CLI tools
12
+ - http://docs.aws.amazon.com/cli/latest/userguide/installing.html
13
+ Or on Linux or OSX this probably will do the job:
14
+ ``` bash
15
+ sudo easy_install pip
16
+ sudo pip install awscli
17
+ ```
18
+
19
+
5
20
We use this public MQTT broker for testing:
6
21
- http://test.mosquitto.org/
7
22
@@ -74,9 +89,9 @@ The lambda function expects custom events like this (see `event-mqtt.json` file)
74
89
75
90
``` json
76
91
{
77
- "topic" : " my-topic" ,
78
- "value" : " hello, lambda!" ,
79
- "retain" : false
92
+ "topic" : " my-topic" ,
93
+ "value" : " hello, lambda!" ,
94
+ "retain" : false
80
95
}
81
96
```
82
97
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ handler = require('./index').handler
3
3
context = {
4
4
done : (cb , result ) ->
5
5
console .log " DONE: " , result
6
- # NOTE: with process.exit 0 - even locally it doesn't work - probably the same thing happens on Lambda
7
- # when commented out - it works locally
8
6
process .exit 0
9
7
return
10
8
}
You can’t perform that action at this time.
0 commit comments