Artemiy Davydov
04/15/2022, 4:28 AMexport default function main(app: <http://sst.App|sst.App>): void {
app.setDefaultFunctionProps({
runtime: "nodejs14.x",
});
for (const region of ["us-west-1", "eu-central-1"]) {
new CoreStack(app, "core-stack", { env: { region } });
}
}
Will that be enough? Or should I create a new stack for each region and share all parts of the main one? https://docs.serverless-stack.com/constructs/Api#sharing-an-api-across-stacks
Do I need to use load balancer? https://docs.serverless-stack.com/constructs/v1/Api#apialbroutepropsDerek Kershner
04/15/2022, 2:54 PMWill that be enough? Or should I create a new stack for each region and share all parts of the main one?for SST, you must deploy multiple times using the
--region
param for the CLI. You can use the current deploying region in the app/stacks though, to choose which parts to deploy in each region.
Multi or single is up to you past that point.Derek Kershner
04/15/2022, 2:56 PMDo I need to use load balancer?Load balancers are more typically associated with the other side of an API gateway, and used for servers. Chances are good that you are more likely thinking of a flexible record in Route53, like a latency routing record: Choosing a routing policy - Amazon Route 53
Artemiy Davydov
04/16/2022, 11:21 AM