diff --git a/apps/api/bronya.config.ts b/apps/api/bronya.config.ts index 5f0e00db..0690349c 100644 --- a/apps/api/bronya.config.ts +++ b/apps/api/bronya.config.ts @@ -141,6 +141,7 @@ export const esbuildOptions: BuildOptions = { * Shared construct props. */ export const constructs: ApiConstructProps = { + functionProps: () => ({ runtime: Runtime.NODEJS_20_X }), functionPlugin: ({ functionProps, handler }, scope) => { const warmingTarget = new LambdaFunction(handler, { event: RuleTargetInput.fromObject(warmingRequestBody), diff --git a/tools/cdk/src/constructs/WebsocProxy.ts b/tools/cdk/src/constructs/WebsocProxy.ts index 90fc85eb..51f8cadf 100644 --- a/tools/cdk/src/constructs/WebsocProxy.ts +++ b/tools/cdk/src/constructs/WebsocProxy.ts @@ -30,7 +30,7 @@ export class WebsocProxy extends Construct { functionName, handler: "index.handler", timeout: Duration.seconds(15), - runtime: Runtime.NODEJS_18_X, + runtime: Runtime.NODEJS_20_X, memorySize: 512, }), { diff --git a/tools/cdk/src/constructs/WebsocScraperV2.ts b/tools/cdk/src/constructs/WebsocScraperV2.ts index 32cd4358..74d35dc5 100644 --- a/tools/cdk/src/constructs/WebsocScraperV2.ts +++ b/tools/cdk/src/constructs/WebsocScraperV2.ts @@ -89,7 +89,7 @@ export class WebsocScraperV2 extends Construct { 'var{DescribeTasksCommand:a,ECSClient:e,ListClustersCommand:s,ListTasksCommand:t,StopTaskCommand:n}=require("@aws-sdk/client-ecs");exports.h=async _=>{let d=new e,{clusterArns:i}=await d.send(new s({})),l=i?.filter(a=>a.includes("websoc-scraper-v2"))[0],{taskArns:r}=await d.send(new t({cluster:l})),{tasks:c}=await d.send(new a({cluster:l,tasks:r}));await Promise.all(c?.filter(a=>a.startedAt&&a.startedAt.valueOf()+36e5d.send(new n({cluster:l,task:a.taskArn})))??[])};', ), handler: "index.h", - runtime: Runtime.NODEJS_18_X, + runtime: Runtime.NODEJS_20_X, architecture: Architecture.ARM_64, role: new Role(this, `${id}-auto-restart-role`, { assumedBy: new ServicePrincipal("lambda.amazonaws.com"),