1. 16
    Create a custom AWS CDK construct
    1m 49s

Create a custom AWS CDK construct

InstructorTomasz Łakomy

Share this video with your friends

Send Tweet

Now that we know a lot about shipping cloud resources with CDK it's time to start creating a serverless backend for our todo application.

We could add the database and new lambda functions to our main stack but after a while it might get difficult to maintain.

Instead, in this lesson we're going learn how to create our very own custom CDK construct

Learn more about CDK constructs here

Mannuel Ferreira
~ a year ago

For CDK version 2, the custom construct can look like this:

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';

export class TodoBackend extends Construct {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id);
  }
}