Application
The AWS CDK application or app is a collection of one or more CDK stacks.
You create an app by defining an app instance. To do this, you import and use the App construct from the AWS Construct Library. The App construct doesn’t require any initialization arguments. It is the only construct that can be used as the root. The following is an example that creates a CDK stack named MyCdkStack, the CDK app is created and MyCdkStack is instantiated in the context of the app:
package com.myorg;
import software.amazon.awscdk.App;
import software.amazon.awscdk.Environment;
import software.amazon.awscdk.StackProps;
import java.util.Arrays;
public class MyCdkApp {
public static void main(final String[] args) {
App app = new App();
new MyCdkStack(app, "MyCdkStack", StackProps.builder()
.build());
app.synth();
}
}When you execute the maven action synth the CDK4J maven plugin produce an AWS CloudFormation template for MyCdkStack.