constructor()

in source/lib/cdk-solution-stack.ts [57:82]


  constructor(scope: cdk.Construct, id: string, props: EMRClusterProps = {}) {
    super(scope, id);

    const cluster = new emr.CfnCluster(this, 'EMRCluster', {
      name: props.name ?? id,
      instances: {
        ec2SubnetId: props.ec2SubnetId,
        terminationProtected: false,
        masterInstanceGroup: props.masterInstanceGroup,
        coreInstanceGroup: props.coreInstanceGroup,
        emrManagedMasterSecurityGroup: props.emrManagedMasterSecurityGroup,
        emrManagedSlaveSecurityGroup: props.emrManagedSlaveSecurityGroup,
        serviceAccessSecurityGroup: props.serviceAccessSecurityGroup,
      },
      visibleToAllUsers: props.visibleToAllUsers,
      releaseLabel: (props.releaseLabel ?? ReleaseLabel.RELEASE_6_1_0).valueOf(),
      jobFlowRole: (props.jobFlowRoleProfile ?? this._defaultJobFlowRoleProfile).ref,
      serviceRole: (props.serviceRole ?? this._defaultServiceRole).roleArn,
      bootstrapActions: props.bootstrapActions,
      configurations: props.configurations,
      applications: props.applications,
      logUri: props.logUri,
    });

    this.clusterId = cluster.ref;
  }