UNPKG

@aws-amplify/graphql-model-transformer

Version:
26 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Provider = void 0; const aws_cdk_lib_1 = require("aws-cdk-lib"); const constructs_1 = require("constructs"); class Provider extends constructs_1.Construct { constructor(scope, id, props) { super(scope, id); this.createFunction = (entrypoint, code, handler, role) => { const fn = new aws_cdk_lib_1.aws_lambda.Function(this, `framework-${entrypoint}`, { code: code, description: `AmplifyManagedTable - ${entrypoint} (${this.node.path})`.slice(0, 256), runtime: aws_cdk_lib_1.aws_lambda.Runtime.NODEJS_24_X, handler, timeout: aws_cdk_lib_1.Duration.minutes(14), role, }); return fn; }; this.onEventHandler = this.createFunction('onEvent', props.lambdaCode, props.onEventHandlerName, props.onEventRole); this.isCompleteHandler = this.createFunction('isComplete', props.lambdaCode, props.isCompleteHandlerName, props.isCompleteRole); this.serviceToken = this.onEventHandler.functionArn; } } exports.Provider = Provider; //# sourceMappingURL=provider.js.map