-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
48 lines (43 loc) · 1.08 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "python-node-app",
removal: input?.stage === "production" ? "retain" : "remove",
home: "local",
providers: {
aws: true,
},
};
},
async run() {
const helloWorld = new sst.aws.Function("MyPythonContainer", {
python: {
container: true,
},
architecture: "arm64",
handler: "python-functions/hello.handler",
runtime: "python3.11",
url: true,
});
const queue = new sst.aws.Queue("MyQueue", {});
queue.subscribe({
python: {
container: true,
},
architecture: "arm64",
handler: "python-functions/queue.handler",
runtime: "python3.11",
});
const createNewMessage = new sst.aws.Function("CreateQueueMessage", {
handler: "node-functions/create-new-message.handler",
link: [queue],
url: true,
});
return {
helloWorld: helloWorld.url,
queue: queue.url,
createNewMessage: createNewMessage.url,
};
},
});