0.36.1 • Published 3 years ago

@myhelix-cdk/apigateway-patterns v0.36.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

apigateway-patterns

A construct for setting up serverless apps using apigateway and lambda

Design

A new service gets a cdk app then maps a lambda to its respective api resource and method. Every api resource gets a new substack and methods are defined and added there.

Usage

    const exampleApi = new apigwpattern.ApigatewayLambdaService(
      this, "apiservice", {
        apiName: "myapi"
      });

    // create resource "example"
    const exampleResource = exampleApi.addNewEndpoint("example");
    // add GET method
    exampleResource.addResourceMethod(
      exampleResourceGetLambda,
      apigwpattern.apiGatewayMethods.GET
    );
    // add POST method
    exampleResource.addResourceMethod(
      exampleResourcePOSTLambda,
      apigwpattern.apiGatewayMethods.POST
    );

    // create resource "example2"
    const exampleResource2 = exampleApi.addNewEndpoint("example2");
    // add POST method for example2
    exampleResource.addResourceMethod(
      example2ResourcePOSTLambda,
      apigwpattern.apiGatewayMethods.POST
    );
0.35.1-alpha.14

3 years ago

0.36.1

3 years ago

1.77.0

3 years ago

0.35.1-alpha.12

3 years ago

0.36.0

3 years ago

0.35.0

3 years ago

0.34.0

4 years ago

0.33.0

4 years ago

0.32.0

4 years ago

0.31.0

4 years ago

0.30.0

4 years ago

0.29.0

4 years ago

0.28.1

4 years ago

0.28.0

4 years ago