How to use the @aws-cdk/custom-resources.Provider function in @aws-cdk/custom-resources

To help you get started, we’ve selected a few @aws-cdk/custom-resources examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / aws-eks / lib / cluster-resource-provider.ts View on Github external
code: lambda.Code.fromAsset(HANDLER_DIR),
      description: 'onEvent handler for EKS cluster resource provider',
      runtime: HANDLER_RUNTIME,
      handler: 'index.onEvent',
      timeout: Duration.minutes(1)
    });

    const isComplete = new lambda.Function(this, 'IsCompleteHandler', {
      code: lambda.Code.fromAsset(HANDLER_DIR),
      description: 'isComplete handler for EKS cluster resource provider',
      runtime: HANDLER_RUNTIME,
      handler: 'index.isComplete',
      timeout: Duration.minutes(1)
    });

    this.provider = new cr.Provider(this, 'Provider', {
      onEventHandler: onEvent,
      isCompleteHandler: isComplete,
      totalTimeout: Duration.hours(1),
      queryInterval: Duration.minutes(5)
    });

    this.roles = [
      onEvent.role!,
      isComplete.role!,
    ];
  }
}

@aws-cdk/custom-resources

Constructs for implementing CDK custom resources

Apache-2.0
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis