-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates image submission handler to use node20 and updated aws-sdk li…
…brary
- Loading branch information
Showing
4 changed files
with
43 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//import your handler file or main file of Lambda | ||
let index = require('./index'); | ||
|
||
//Call your exports function with required params | ||
//In AWS lambda these are event, content, and callback | ||
//event and content are JSON object and callback is a function | ||
//In my example i'm using empty JSON | ||
index.handler( require('./testEvent.json'), //event | ||
{}, //content | ||
function(ss,data) { //callback function with two arguments | ||
console.log(data); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"Records": [ | ||
{ | ||
"cf": { | ||
"request": { | ||
"headers": { | ||
"host": [ | ||
{ | ||
"key": "Host", | ||
"value": "phlask.me" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"querystring": "type=image/png" | ||
} | ||
} | ||
} | ||
] | ||
} |