{"record":{"id":"7bc03be0ddc7de02","repo":"anomalyco/sst","slug":"no-deployment-regions-specified-please-specify-at","errorCode":null,"errorMessage":"No deployment regions specified. Please specify at least one region in the 'regions' property.","messagePattern":"No deployment regions specified\\. Please specify at least one region in the 'regions' property\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/ssr-site.ts","lineNumber":1224,"sourceCode":"        if (!sitePath) return \".\";\n\n        if (!fs.existsSync(sitePath)) {\n          throw new VisibleError(\n            `Site directory not found at \"${path.resolve(\n              sitePath,\n            )}\". Please check the path setting in your configuration.`,\n          );\n        }\n        return sitePath;\n      });\n    }\n\n    function normalizeRegions() {\n      return output(\n        args.regions ?? [getRegionOutput(undefined, { parent: self }).region],\n      ).apply((regions) => {\n        if (regions.length === 0)\n          throw new VisibleError(\n            \"No deployment regions specified. Please specify at least one region in the 'regions' property.\",\n          );\n\n        return regions.map((region) => {\n          if (\n            [\n              \"ap-south-2\",\n              \"ap-southeast-4\",\n              \"ap-southeast-5\",\n              \"ca-west-1\",\n              \"eu-south-2\",\n              \"eu-central-2\",\n              \"il-central-1\",\n              \"me-central-1\",\n            ].includes(region)\n          )\n            throw new VisibleError(\n              `Region ${region} is not supported by this component. Please select a different AWS region.`,","sourceCodeStart":1206,"sourceCodeEnd":1242,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/ssr-site.ts#L1206-L1242","documentation":"SSR site components support regional deployment via the `regions` prop (or the fallback of the current stack's region). If the resulting regions list is empty — e.g. `regions: []` — SST refuses to deploy because at least one deployment region is required to create the server functions.","triggerScenarios":"Explicitly passing `regions: []` to an SSR site component, or providing a regions array that resolves to an empty list.","commonSituations":"Dynamically computing regions from env/config that ends up empty; copy-pasting an example with a placeholder list and clearing it; conditional logic that strips all regions in some environments.","solutions":["Provide at least one region, e.g. `regions: [\"us-east-1\"]`","Remove the `regions` prop entirely to default to the stack's own region","Fix the logic/env var feeding the regions array so it is non-empty"],"exampleFix":"// before\nnew sst.aws.NextjsSite(\"Web\", { path: \"src\", regions: [] });\n// after\nnew sst.aws.NextjsSite(\"Web\", { path: \"src\", regions: [\"us-east-1\"] });","handlingStrategy":"validation","validationCode":"const regions = process.env.SITE_REGIONS?.split(\",\") ?? [];\nif (regions.length === 0) {\n  throw new Error(\"Provide at least one region via SITE_REGIONS or omit `regions` to use the stack region\");\n}","typeGuard":"function hasRegions(r: string[] | undefined): r is [string, ...string[]] {\n  return Array.isArray(r) && r.length > 0;\n}","tryCatchPattern":"try {\n  new sst.aws.NextjsSite(\"Web\", { path: \"src\", regions });\n} catch (e) {\n  if (String(e).includes(\"No deployment regions\")) console.error(\"regions resolved to empty list\");\n  throw e;\n}","preventionTips":["Don't pass `regions: []`; omit the prop to default to the stack's region","Validate any env-driven regions list before constructing the component","Type regions as [string, ...string[]] to catch empties at compile time"],"tags":["ssr-site","regions","config","multi-region"],"backgroundTag":"missing-required-config","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}