Skip to content

Commit

Permalink
Switch to end variables
Browse files Browse the repository at this point in the history
  • Loading branch information
joehoyle committed Jan 3, 2017
1 parent f949654 commit 07dc052
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lambda-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ http.createServer( function( request, response ) {
var config = {
region: request.headers.region,
lambdaFunction : request.headers['lambda-function'],
lambdaRegion: request.headers['lambda-region'] ? request.headers['lambda-region'] : request.headers['region'],
bucket: request.headers.bucket
lambdaRegion: request.headers['lambda-region'] ? request.headers['lambda-region'] : request.headers['region']
}

var lambda = new aws.Lambda({ region: config.lambdaRegion })
Expand All @@ -38,10 +37,8 @@ http.createServer( function( request, response ) {
return lambda.invoke({
FunctionName: config.lambdaFunction,
Payload: JSON.stringify( {
bucket: config.bucket,
key: key,
args: params.query,
region: config.region
args: params.query
} )
}, function( err, data ) {

Expand Down

0 comments on commit 07dc052

Please sign in to comment.