How I’m releasing a NextJs site using SST and I ha...
# sst
y
How I’m releasing a NextJs site using SST and I have it working well. The only thing is even though I set region to
us-east-1
I notice the CDK formation and the S3 sitebucket are created in
eu-west-1
which must be the default region I set for the AWS CLI. How can I ensure that the CDK + S3 and really all related services for that deployment are all created in the same region?
m
do you have region configured in
sst.json
?
y
No. I currently only pass it in the stack via the environment variables region
Copy code
{
 environment: {
  REGION: 'us-east-1'
 }
}
This seems to only set the edge lambda in that region
m
You can change the region in
sst.json
to change default region.
y
Ok but I noticed this will be
deprecated
soon
Or maybe that was the stage
What if I want this to be dynamic..so different environments should be set in different regions
Would it then be recommend to set it using the
--region
param in the cli?
Setting it via the cli worked..thanks!
t
Yeah I wouldn't set it in sst.json - it's better to control through environment using aws's configuration