Creating CDK Constructs is very similar to creating a CDK Stack: We extend cdk.Construct
instead of cdk.Stack
.
const cdk = require("@aws-cdk/core");
class MyConstruct extends cdk.Construct {
constructor(scope, id, props) {
super(scope, id, props);
}
}