-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.ts
32 lines (28 loc) · 774 Bytes
/
setup.ts
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
28
29
30
31
32
import { buildSync } from "esbuild";
import { App } from "aws-cdk-lib";
import { Config } from "@config";
import { SimpleLambdaStack } from "./src/stack";
import path from "node:path";
buildSync({
bundle: true,
entryPoints: [path.resolve(__dirname, "src", "lambda", "index.ts")],
external: ["aws-sdk"],
format: "cjs",
outfile: path.join(__dirname, "dist", "index.js"),
platform: "node",
sourcemap: true,
target: "node16",
});
const app = new App();
new SimpleLambdaStack(app, `${Config.stack.project}`, {
description: `${Config.stack.description}`,
stackName: `${Config.stack.name}`,
env: {
region: `${Config.region}`,
},
tags: {
project: `${Config.stack.project}`,
deployedAt: `${new Date().toDateString()}`,
},
});
app.synth();