CDK reusable constructs for building epilot microservices

Usage no npm install needed!

<script type="module">
  import epilotCdkConstructs from 'https://cdn.skypack.dev/@epilot/cdk-constructs';



Reusable CDK Constructs for other epilot microservices to consume


Add latest package to your project with npm/yarn

yarn add -D @epilot/cdk-constructs

Start using cdk constructs in your infrastructure definition

1.Http OpenAPI definition

Summary: It will create Http API V2 resource in API Gateway, Route definitions and 1 lambda integration for each defined route

import { HttpOpenApi } from '@epilot/cdk-constructs'

// ... in your stack definition
const api = new HttpOpenApi(this, 'MyApi', {
    serviceName: 'my-service',
    openApiSpec: './openapi.yml',
    lambdasSourcePath: './dist/src' // optional. It defaults to './.build/src'
    integrations: [
            operationId: 'getEntity', // found in openapi.yml
            handler: 'api.getEntity' // file.method to handle the request
            operationId: 'storeEntity',
            handler: 'api.storeEntity'

Steps for release

  1. npm login (credentials are stored in 1password)
  2. yarn release
  3. npm publish