{"record":{"id":"fb7569c651561be8","repo":"anomalyco/sst","slug":"you-must-provide-the-password-to-connect-to-your-l","errorCode":null,"errorMessage":"You must provide the password to connect to your locally running database either by setting the \"dev.password\" or by setting the top-level \"password\" property.","messagePattern":"You must provide the password to connect to your locally running database either by setting the \"dev\\.password\" or by setting the top-level \"password\" property\\.","errorType":"exception","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/aurora.ts","lineNumber":841,"sourceCode":"        return {\n          subnets: args.vpc.privateSubnets,\n          securityGroups: args.vpc.securityGroups,\n        };\n      }\n\n      // \"vpc\" is object\n      return output(args.vpc);\n    }\n\n    function registerDev() {\n      if (!args.dev) return undefined;\n\n      if (\n        $dev &&\n        args.dev.password === undefined &&\n        args.password === undefined\n      ) {\n        throw new VisibleError(\n          `You must provide the password to connect to your locally running database either by setting the \"dev.password\" or by setting the top-level \"password\" property.`,\n        );\n      }\n\n      const dev = {\n        enabled: $dev,\n        host: output(args.dev.host ?? \"localhost\"),\n        port: all([args.dev.port, engine]).apply(\n          ([port, engine]) => port ?? { postgres: 5432, mysql: 3306 }[engine],\n        ),\n        username: args.dev.username ? output(args.dev.username) : username,\n        password: output(args.dev.password ?? args.password ?? \"\"),\n        database: args.dev.database ? output(args.dev.database) : dbName,\n      };\n\n      new DevCommand(`${name}Dev`, {\n        dev: {\n          title: name,","sourceCodeStart":823,"sourceCodeEnd":859,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/aurora.ts#L823-L859","documentation":"In `sst dev`, the Aurora component runs the database locally (e.g. via Docker) and needs a password to initialize/connect to it. In dev mode, SST does not use the AWS-managed secret, so you must provide the password explicitly via `dev.password` on the component or the top-level `password` argument.","triggerScenarios":"Running `sst dev` with an Aurora/AuroraPostgres component where neither `dev.password` nor the top-level `password` argument is set (`$dev` is true and both are undefined).","commonSituations":"Running local dev for the first time on a config written for deploy-only; a teammate's sst.config.ts relying on credentials stored elsewhere; CI/devcontainers where env-provided passwords aren't wired into the config.","solutions":["Add `dev: { password: \"...\" }` to the Aurora component args in sst.config.ts","Or set the top-level `password` argument on the component, which is used in dev when `dev.password` is absent","Use a secret-safe value (e.g. from `sst.Secret` or a dev-only literal) and ensure it matches the password the local container is initialized with"],"exampleFix":"// before\nnew sst.aws.AuroraPostgres(\"DB\", {});\n// after\nnew sst.aws.AuroraPostgres(\"DB\", {\n  dev: { password: \"my-local-dev-password\" }\n});","handlingStrategy":"validation","validationCode":"if ($dev && args.dev?.password === undefined && args.password === undefined)\n  throw new Error('Set dev.password (or top-level password) on the Aurora component for sst dev');","typeGuard":"function hasDevPassword(args, $dev) {\n  return !$dev || args.dev?.password !== undefined || args.password !== undefined;\n}","tryCatchPattern":"try {\n  const db = new sst.aws.AuroraPostgres(\"DB\", args);\n} catch (e) {\n  if (String(e).includes(\"provide the password\")) {\n    throw new Error('Add dev: { password: \"...\" } to the Aurora component before running sst dev');\n  }\n  throw e;\n}","preventionTips":["Always set dev.password when a component will be used with sst dev","Document the dev password requirement in your repo's onboarding notes","Keep dev passwords as non-secrets local-only values, distinct from production credentials stored in AWS","Run a quick config check script before `sst dev` that asserts dev.password is present for database components"],"tags":["aurora","dev-mode","password","missing-config"],"backgroundTag":"missing-env-var","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}