anomalyco/sst · error · VisibleError
Proxy is not enabled. Enable it with "proxy: true".
Error message
Proxy is not enabled. Enable it with "proxy: true".
What it means
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.
Source
Thrown at platform/src/components/aws/mysql.ts:923
}
/**
* The identifier of the MySQL instance.
*/
public get id() {
if (this.dev?.enabled) return output("placeholder");
return this.instance!.identifier;
}
/**
* The name of the MySQL proxy.
*/
public get proxyId() {
if (this.dev?.enabled) return output("placeholder");
return this.proxy!.apply((v) => {
if (!v) {
throw new VisibleError(
`Proxy is not enabled. Enable it with "proxy: true".`,
);
}
return v.id;
});
}
/** The username of the master user. */
public get username() {
if (this.dev?.enabled) return this.dev.username;
return this.instance!.username;
}
/** The password of the master user. */
public get password() {
if (this.dev?.enabled) return this.dev.password;
return this._password!;
}View on GitHub (pinned to a0bd20f762)
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
Example fix
// before
const db = new sst.aws.MySql("MyDb", {});
const proxy = db.proxyId;
// after
const db = new sst.aws.MySql("MyDb", { proxy: true });
const proxy = db.proxyId; Defensive patterns
Strategy: validation
Validate before calling
const db = new sst.aws.MySql("MyDb", { proxy: true });
// proxyId is only meaningful when proxy is enabled
if (!proxyEnabled) throw new Error("Enable proxy: true before using db.proxyId"); Prevention
- 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
When it happens
Trigger: Reading db.proxyId on a MySql component created without `proxy: true`, while not running in dev mode (dev mode returns a placeholder instead).
Common situations: 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.
Related errors
- Reader endpoint is not currently supported for RDS Proxy. Pl
- Failed to get password for MySQL ${name}.
- Storage must be at least 20 GB for the ${name} MySQL databas
- Storage cannot be greater than 65536 GB (64 TB) for the ${na
- You are using the "Vpc.v1" component. Please migrate to the
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/22c82b5539373ef7.
Report an issue: GitHub.