{"record":{"id":"22c82b5539373ef7","repo":"anomalyco/sst","slug":"proxy-is-not-enabled-enable-it-with-proxy-true","errorCode":null,"errorMessage":"Proxy is not enabled. Enable it with \"proxy: true\".","messagePattern":"Proxy is not enabled\\. Enable it with \"proxy: true\"\\.","errorType":"exception","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/mysql.ts","lineNumber":923,"sourceCode":"  }\n\n  /**\n   * The identifier of the MySQL instance.\n   */\n  public get id() {\n    if (this.dev?.enabled) return output(\"placeholder\");\n    return this.instance!.identifier;\n  }\n\n  /**\n   * The name of the MySQL proxy.\n   */\n  public get proxyId() {\n    if (this.dev?.enabled) return output(\"placeholder\");\n\n    return this.proxy!.apply((v) => {\n      if (!v) {\n        throw new VisibleError(\n          `Proxy is not enabled. Enable it with \"proxy: true\".`,\n        );\n      }\n      return v.id;\n    });\n  }\n\n  /** The username of the master user. */\n  public get username() {\n    if (this.dev?.enabled) return this.dev.username;\n    return this.instance!.username;\n  }\n\n  /** The password of the master user. */\n  public get password() {\n    if (this.dev?.enabled) return this.dev.password;\n    return this._password!;\n  }","sourceCodeStart":905,"sourceCodeEnd":941,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/mysql.ts#L905-L941","documentation":"The proxyId getter returns the ID of the RDS proxy created for the MySQL database, but only if proxy support was enabled. If the proxy output is falsy (proxy not enabled), accessing proxyId throws this VisibleError telling you to enable it.","triggerScenarios":"Reading db.proxyId on a MySql component created without `proxy: true`, while not running in dev mode (dev mode returns a placeholder instead).","commonSituations":"Wiring a function or service to the proxy connection string but forgetting to enable proxy in the component config; enabling proxy in one environment but referencing proxyId in another.","solutions":["Add proxy: true to the MySql component arguments","Re-deploy so the RDS proxy is created, then access proxyId","If dev mode, proxyId intentionally returns a placeholder and this error won't occur"],"exampleFix":"// before\nconst db = new sst.aws.MySql(\"MyDb\", {});\nconst proxy = db.proxyId;\n// after\nconst db = new sst.aws.MySql(\"MyDb\", { proxy: true });\nconst proxy = db.proxyId;","handlingStrategy":"validation","validationCode":"const db = new sst.aws.MySql(\"MyDb\", { proxy: true });\n// proxyId is only meaningful when proxy is enabled\nif (!proxyEnabled) throw new Error(\"Enable proxy: true before using db.proxyId\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable proxy: true on any MySql component whose proxyId you consume","Keep proxy configuration consistent across environments","Avoid reading proxyId in dev mode paths (it returns a placeholder)","Comment component configs where proxyId is used downstream"],"tags":["mysql","aws","rds-proxy","configuration"],"backgroundTag":"feature-not-enabled","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}