Created
November 1, 2022 10:08
-
-
Save cal0610/85ec8c4ca891a0e18424dadef863a096 to your computer and use it in GitHub Desktop.
lambda integration
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
const getAllIntegration = new LambdaIntegration(getAllLambda, {proxy: true}); | |
const createOneIntegration = new LambdaIntegration(createOneLambda, {proxy: true}); | |
const getOneIntegration = new LambdaIntegration(getOneLambda, {proxy: true}); | |
const updateOneIntegration = new LambdaIntegration(updateOneLambda, {proxy: true}); | |
const deleteOneIntegration = new LambdaIntegration(deleteOneLambda, {proxy: true}); | |
const store = api.root.addResource('store'); | |
store.addMethod('POST', createOneIntegration); | |
store.addMethod('GET', getAllIntegration); | |
const singleStore = store.addResource('{id}'); | |
singleStore.addMethod('GET', getOneIntegration); | |
singleStore.addMethod('PATCH', updateOneIntegration); | |
singleStore.addMethod('DELETE', deleteOneIntegration); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment