-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for Step Functions (#668)
- Loading branch information
Showing
6 changed files
with
39 additions
and
3 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,27 @@ | ||
const getRequestValuesFromStepFunctions = ({ event }) => { | ||
const method = 'POST' | ||
const headers = { host: 'stepfunctions.amazonaws.com' } | ||
const body = event | ||
|
||
return { | ||
method, | ||
headers, | ||
body | ||
} | ||
} | ||
|
||
const getResponseToStepFunctions = ({ | ||
body, | ||
isBase64Encoded = false | ||
}) => { | ||
if (isBase64Encoded) { | ||
throw new Error('base64 encoding is not supported') | ||
} | ||
|
||
return JSON.parse(body) | ||
} | ||
|
||
module.exports = { | ||
getRequest: getRequestValuesFromStepFunctions, | ||
getResponse: getResponseToStepFunctions | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const { getRequest, getResponse } = require('./http-function-runtime-v3') | ||
|
||
module.exports = { | ||
getRequest: getRequest, | ||
getResponse: getResponse | ||
getRequest, | ||
getResponse | ||
} |
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