-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.ts
More file actions
27 lines (25 loc) · 810 Bytes
/
stack.ts
File metadata and controls
27 lines (25 loc) · 810 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
27
import path from "node:path";
import { type App, Duration, Stack, type StackProps } from "aws-cdk-lib";
import { Architecture, Runtime } from "aws-cdk-lib/aws-lambda";
import { NodejsFunction, OutputFormat } from "aws-cdk-lib/aws-lambda-nodejs";
export const BasicCdk = class extends Stack {
constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);
new NodejsFunction(this, "BasicCdk", {
architecture: Architecture.ARM_64,
bundling: {
format: OutputFormat.ESM,
minify: true,
sourceMap: true,
},
entry: path.join(__dirname, "./function.ts"),
durableConfig: {
executionTimeout: Duration.minutes(1),
retentionPeriod: Duration.days(1),
},
functionName: "basic-cdk",
handler: "index.handler",
runtime: Runtime.NODEJS_24_X,
});
}
};