Does SST recommend all stacks to be environment ag...
# help
a
Does SST recommend all stacks to be environment agnostic? Because with aws cdk there are some limitations for constructs created this way
f
Hey @August C, yeah, that’s what I’d recommend with SST.
Can you share what the limitations are? Jurious to hear.
a
Thanks, the docs say for example that if the stack is environment-agnostic, it'll only have at max 2 availability zones for the VPC
maxAz
field.
f
Ah I see. There might be a bit of confusion. So in CDK’s term, a env-agnostic stack is one where the region is unknown at build time. So when CDK tries to build the CloudFormation template, it can’t determine how many AZs to create, so it can only uses 2, since all AWS regions have at least 2.
With SST, you specify the region in
sst.json
, or through CLI
--region
, and defaults to
us-east-1
. So to CDK, the stacks are not env-agnostic, because the region is known at build time.
Let me know if that makes sense.