anomalyco/sst · warning
Resource is deprecated. Use sst.Linkable instead.
Error message
Resource is deprecated. Use sst.Linkable instead.
What it means
`sst.Resource` is the deprecated predecessor of `sst.Linkable`. Its constructor prints "Resource is deprecated. Use sst.Linkable instead." to warn you that custom resources being linked into functions should now be created with `sst.Linkable`, which additionally supports `include` for permissions/bindings. The warning is non-fatal; the component still works.
Source
Thrown at platform/src/components/linkable.ts:334
/**
* @deprecated
* Use sst.Linkable instead.
*/
export class Resource extends Component implements Link.Linkable {
private _properties: any;
private _name: string;
constructor(name: string, properties: any) {
super(
"sst:sst:Resource",
name,
{
properties,
},
{},
);
console.warn("Resource is deprecated. Use sst.Linkable instead.");
this._properties = properties;
this._name = name;
}
public get name() {
return output(this._name);
}
public get properties() {
return this._properties;
}
/** @internal */
public getSSTLink() {
return {
properties: this._properties,
};
}View on GitHub (pinned to a0bd20f762)
Solutions
- Replace `new sst.Resource(name, props)` with `new sst.Linkable(name, { properties: props })`
- If the old Resource wrapped a real AWS resource and you need IAM permissions, use `sst.Linkable.wrap(resource, (r) => ({ properties: {...} , include: [sst.aws.permission({...})] }))` from platform/src/components/aws/linkable.ts
- Keep the Resource usage if you must stay on legacy code — the warning is harmless — but plan migration before removal in a future major release
Example fix
// before
const myData = new sst.Resource("MyData", {
table: myTable.name,
});
// after
const myData = new sst.Linkable("MyData", {
properties: {
table: myTable.name,
},
}); Defensive patterns
Strategy: validation
Validate before calling
// Detect deprecated Resource usage in your config before deploy
if ("Resource" in sst && sst.Resource) {
console.warn("sst.Resource is deprecated; use sst.Linkable instead");
} Prevention
- Search sst.config.ts for `new sst.Resource` during dependency upgrades and migrate to sst.Linkable
- Use sst.Linkable.wrap when linking existing Pulumi/AWS resources so permissions can be included
- Treat deprecation warnings in deploy output as action items, not noise
When it happens
Trigger: Instantiating the deprecated class in sst.config.ts: `new sst.Resource("MyResource", { ...properties })` (constructor at platform/src/components/linkable.ts:334 emits console.warn on every construction). Any copied example code or old app config predating the Linkable rename triggers it.
Common situations: Upgrading an SST app from an older version where Resource was the way to link arbitrary values; following outdated tutorials/docs or Stack Overflow answers that predate sst.Linkable; linking constants or outputs of non-SST Pulumi resources to functions.
Related errors
- The "routeSite" function has been deprecated. Configure the
- sst.linkable is deprecated. Use sst.Linkable.wrap instead.
- Invalid function definition for the "${name}" Function
- The provided ARN "${arn}" is not a Lambda function ARN.
- The provided ARN "${arn}" is not an S3 bucket ARN.
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/d24c54df237fad1c.
Report an issue: GitHub.