diff --git a/packages/cdk/lib/stacks/engines/cromwell-engine-construct.ts b/packages/cdk/lib/stacks/engines/cromwell-engine-construct.ts index eed30d35..063e9af8 100644 --- a/packages/cdk/lib/stacks/engines/cromwell-engine-construct.ts +++ b/packages/cdk/lib/stacks/engines/cromwell-engine-construct.ts @@ -71,7 +71,7 @@ export class CromwellEngineConstruct extends EngineConstruct { userId: params.userId, engineEndpoint: this.engine.loadBalancer.loadBalancerDnsName, }); - this.adapterLogGroup = lambda.logGroup; + this.adapterLogGroup = LogGroup.fromLogGroupName(this, "CromwellAdapterLogGroup", "/aws/lambda/" + lambda.functionName); this.apiProxy = new ApiProxy(this, { apiName: `${params.projectName}${params.contextName}${engineContainer.serviceName}ApiProxy`, diff --git a/packages/cdk/lib/stacks/engines/miniwdl-engine-construct.ts b/packages/cdk/lib/stacks/engines/miniwdl-engine-construct.ts index a3e38ce6..10a8c693 100644 --- a/packages/cdk/lib/stacks/engines/miniwdl-engine-construct.ts +++ b/packages/cdk/lib/stacks/engines/miniwdl-engine-construct.ts @@ -3,7 +3,7 @@ import { Bucket, IBucket } from "aws-cdk-lib/aws-s3"; import { ApiProxy, Batch } from "../../constructs"; import { EngineConstruct, EngineOutputs } from "./engine-construct"; import { Effect, IRole, ManagedPolicy, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from "aws-cdk-lib/aws-iam"; -import { ILogGroup } from "aws-cdk-lib/aws-logs"; +import { LogGroup, ILogGroup } from "aws-cdk-lib/aws-logs"; import { MiniWdlEngine } from "../../constructs/engines/miniwdl/miniwdl-engine"; import { IMachineImage, IVpc, SubnetSelection } from "aws-cdk-lib/aws-ec2"; import { ENGINE_MINIWDL } from "../../constants"; @@ -96,8 +96,8 @@ export class MiniwdlEngineConstruct extends EngineConstruct { vpc: props.contextParameters.usePublicSubnets ? undefined : props.vpc, vcpSubnets: props.contextParameters.usePublicSubnets ? undefined : props.subnets, }); - this.adapterLogGroup = lambda.logGroup; - + this.adapterLogGroup = LogGroup.fromLogGroupName(this, "MiniWdlAdapterLogGroup", "/aws/lambda/" + lambda.functionName); + this.apiProxy = new ApiProxy(this, { apiName: `${params.projectName}${params.userId}${params.contextName}MiniWdlApiProxy`, lambda, diff --git a/packages/cdk/lib/stacks/engines/nextflow-engine-construct.ts b/packages/cdk/lib/stacks/engines/nextflow-engine-construct.ts index 8174472a..2dfa6a37 100644 --- a/packages/cdk/lib/stacks/engines/nextflow-engine-construct.ts +++ b/packages/cdk/lib/stacks/engines/nextflow-engine-construct.ts @@ -4,7 +4,7 @@ import { EngineOptions } from "../../types"; import { Bucket } from "aws-cdk-lib/aws-s3"; import { ApiProxy } from "../../constructs"; import { EngineOutputs, EngineConstruct } from "./engine-construct"; -import { ILogGroup } from "aws-cdk-lib/aws-logs"; +import { LogGroup, ILogGroup } from "aws-cdk-lib/aws-logs"; import { IJobQueue } from "@aws-cdk/aws-batch-alpha"; import { NextflowEngineRole } from "../../roles/nextflow-engine-role"; import { NextflowAdapterRole } from "../../roles/nextflow-adapter-role"; @@ -71,8 +71,8 @@ export class NextflowEngineConstruct extends EngineConstruct { vpc: props.contextParameters.usePublicSubnets ? undefined : props.vpc, subnets: props.contextParameters.usePublicSubnets ? undefined : props.subnets, }); - this.adapterLogGroup = lambda.logGroup; - + this.adapterLogGroup = LogGroup.fromLogGroupName(this, "NextflowAdapterLogGroup", "/aws/lambda/" + lambda.functionName); + this.apiProxy = new ApiProxy(this, { apiName: `${params.projectName}${params.userId}${params.contextName}NextflowApiProxy`, lambda, diff --git a/packages/cdk/lib/stacks/engines/snakemake-engine-construct.ts b/packages/cdk/lib/stacks/engines/snakemake-engine-construct.ts index 3064dacf..22ace22a 100644 --- a/packages/cdk/lib/stacks/engines/snakemake-engine-construct.ts +++ b/packages/cdk/lib/stacks/engines/snakemake-engine-construct.ts @@ -3,7 +3,7 @@ import { SnakemakeEngine } from "../../constructs/engines/snakemake/snakemake-en import { EngineOptions } from "../../types"; import { ApiProxy, Batch } from "../../constructs"; import { EngineOutputs, EngineConstruct } from "./engine-construct"; -import { ILogGroup } from "aws-cdk-lib/aws-logs"; +import { LogGroup, ILogGroup } from "aws-cdk-lib/aws-logs"; import { ComputeResourceType } from "@aws-cdk/aws-batch-alpha"; import { ENGINE_SNAKEMAKE } from "../../constants"; import { Construct } from "constructs"; @@ -61,7 +61,7 @@ export class SnakemakeEngineConstruct extends EngineConstruct { fsapId: this.snakemakeEngine.fsap.accessPointId, outputBucket: params.getEngineBucketPath(), }); - this.adapterLogGroup = lambda.logGroup; + this.adapterLogGroup = LogGroup.fromLogGroupName(this, "SnakemakeAdapterLogGroup", "/aws/lambda/" + lambda.functionName); // Generate our api gateway proxy this.apiProxy = this.createApiProxy(params, lambda);