-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added AWS S3 Event Source * Update s3.js --------- Co-authored-by: Jon Greenwood <[email protected]> Co-authored-by: Brett Andrews <[email protected]>
- Loading branch information
1 parent
1d4d58e
commit 1132c1a
Showing
3 changed files
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const getRequestValuesFromS3 = ({ event }) => { | ||
const method = 'POST' | ||
const headers = { host: 's3.amazonaws.com' } | ||
const body = event | ||
|
||
return { | ||
method, | ||
headers, | ||
body | ||
} | ||
} | ||
|
||
const getResponseToS3 = ({ | ||
statusCode, | ||
body, | ||
headers, | ||
isBase64Encoded | ||
}) => ({ | ||
statusCode, | ||
headers, | ||
body, | ||
isBase64Encoded | ||
}) | ||
|
||
module.exports = { | ||
getRequest: getRequestValuesFromS3, | ||
getResponse: getResponseToS3 | ||
} |
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