-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
34 lines (31 loc) · 1003 Bytes
/
sst.config.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
33
34
import type { SSTConfig } from "sst";
import { StackContext, SvelteKitSite } from "sst/constructs";
import {ApiStack} from "./stacks/api";
import {ApiHandlerStack} from "./stacks/lambda";
import {CognitoStack} from "./stacks/cognito";
export default {
config(_input) {
return {
name: "weekly-budgeter-v2",
region: "us-east-1",
};
},
stacks(app) {
app.stack(function Stack({ stack }: StackContext) {
const apiHandler = new ApiHandlerStack(app, `ApiHandler-${app.stage}`);
const cognito = new CognitoStack(app, `Cognito-${app.stage}`);
const api = new ApiStack(app, `ApiGatway-${app.stage}`, {
region: stack.region,
lambdaHandlers: apiHandler.lambdaHandlers,
userPoolArn: cognito.userPoolArn,
});
stack.addDependency(api);
})
app.stack(function Site({ stack }) {
const site = new SvelteKitSite(stack, "site");
stack.addOutputs({
url: site.url,
});
});
},
} satisfies SSTConfig;