Skip to content

Instantly share code, notes, and snippets.

@thomaspoignant
Created February 18, 2021 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomaspoignant/3e02beff6bd57dce77b6703557029095 to your computer and use it in GitHub Desktop.
Save thomaspoignant/3e02beff6bd57dce77b6703557029095 to your computer and use it in GitHub Desktop.
/**
* createApiGatewayForLambda is creating a Rest API Gateway to access to your lambda function
* @param id - CDK id for this lambda
* @param handler - Lambda function to call
* @param description - Description of this endpoint
*/
createApiGatewayForLambda(id: string, handler: lambda.Function, description: string): LambdaRestApi{
return new LambdaRestApi(this, id, {
handler,
description
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment