Diagram
AWS Cloud Development Kit Tree/Node Diagram (draw.io viewer)

Details
- The AWS CDK is a tree/node relationship structure, requiring the initializing of the root node via the
app = new.cdk.App()object, imported from theaws-cdk-libCDK library. The object inherits theStageobject which in turn inherits theConstructobject. - Subsequent AWS resources are instantiated
Stackobjects, such as thebucketStack = new BucketStack(app, 'BucketStack')instance created, which in turn inherits theConstructobject. - Hence, each new instantiation of an AWS resource, is a child of the Construct, which is then added to the root Construct,
appper the firstscopeargument for each instantiated resource’s constructor.- i.e., handlerStack = new HandlerStack(
app, ‘HandlerStack’, extendedProps..)
- i.e., handlerStack = new HandlerStack(
- Resouces created inside resources, such as the
new LambdaFunction(this, 'LambdaFunction', FunctionProps)Lambda functions, contains the first argumentthis, for thescopeparameter since this is the parent object, handlerStack, which inherits aConstructobject.
To button up the tree node relationship, each object is inherited from Construst, which in turn is nested within each other via the scope parameter, either as this when scoping in as a child of a resource, such as handlerStack, or as app for each new instantiated resource. Each nested resource is scoped within it’s parent, and each resource is scoped within its root node, app.
