Skip to content

Commit

Permalink
Fix npm module installation instructions; fix iopipe lib usage
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Windisch <eric@iopipe.com>
  • Loading branch information
ewindisch committed Jul 29, 2016
1 parent aba68d6 commit a5399be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Requirements:
# Installation

1. Modify project.json to include your own IAM role.
2. Deploy to AWS with `apex deploy exec`.
2. Install npm modules: `cd functions/exec; npm install`
3. Deploy to AWS with `apex deploy exec`.

# Usage

Expand Down
4 changes: 2 additions & 2 deletions functions/exec/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ var iopipe = require("iopipe")({
debug: true,
clientId: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImF1dGgwfDU3NjA2MDBhMzk5OTU1NGU2YWI4ZTg2OCIsInVzZXJuYW1lIjoiZXdpbmRpc2NoIiwiaWF0IjoxNDY5NTQwMjUyLCJhdWQiOiJodHRwczovL21ldHJpY3MtYXBpLmlvcGlwZS5jb20vZXZlbnQvIn0.oeGARaTczhJzTkx80N_Ctre0XsbGQxFxFzqw8jyFbwE"
})
exports.handle = function(e, ctx, cb) {
exports.handle = iopipe(function(e, ctx, cb) {
child_process.exec(e.command, {
maxBuffer: 1024*1024*512
}, (err, stdout, stderr) => {
cb(err, stdout)
})
}
})
2 changes: 1 addition & 1 deletion project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "",
"memory": 128,
"timeout": 300,
"role": "",
"role": "arn:aws:iam::554407330061:role/hello-world_lambda_function",
"environment": {}
}

0 comments on commit a5399be

Please sign in to comment.