@epilot/cdk-constructs
v4.0.6
Published
CDK reusable constructs for building epilot microservices
Downloads
825
Maintainers
Readme
cdk-constructs
Reusable CDK Constructs for other epilot microservices to consume
Setup
Add latest package to your project with npm
npm i -D @epilot/cdk-constructs
Start using cdk constructs in your infrastructure definition Examples
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',
integrations: [
{
operationId: 'getEntity', // found in openapi.yml
handler: 'api.getEntity' // file.method to handle the request
entry: 'index.ts'
},
{
operationId: 'storeEntity',
handler: 'api.storeEntity',
entry: 'index.ts'
}
]
})
Steps for release
- npm login (credentials are stored in 1password)
- npm run release
- npm publish