forked from CloudSnorkel/cdk-github-runners
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-function.ts
More file actions
26 lines (24 loc) · 873 Bytes
/
Copy pathsetup-function.ts
File metadata and controls
26 lines (24 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
import * as path from 'path';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { Construct } from 'constructs';
/**
* Props for SetupFunction
*/
export interface SetupFunctionProps extends lambda.FunctionOptions {
}
/**
* An AWS Lambda function which executes src/setup.
*/
export class SetupFunction extends lambda.Function {
constructor(scope: Construct, id: string, props?: SetupFunctionProps) {
super(scope, id, {
description: 'src/setup.lambda.ts',
...props,
runtime: new lambda.Runtime('nodejs18.x', lambda.RuntimeFamily.NODEJS),
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, '../assets/setup.lambda')),
});
this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true });
}
}