README
cdk-constructs
Reusable CDK Constructs for other epilot microservices to consume
Setup
Add latest package to your project with npm/yarn
yarn add -D @epilot/cdk-constructs
Examples
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
- npm login (credentials are stored in 1password)
- yarn release
- npm publish