Repro:
- Have an already deployed SST APIGateway resource
- Add a simple route
- Run
sst refresh --verbose --print-logs
Pulumi will exit with error code 255 and with the following log:
✓ Refreshed
Router: https://***.cloudfront.net
Api: https://***.execute-api.eu-west-1.amazonaws.com
---
api: https://***.execute-api.eu-west-1.amazonaws.com
router: https://***.cloudfront.net
time=2026-04-10T19:53:35.758+02:00 level=INFO msg="INFO unlocking app=aws-bun-test stage=fabryscript"
time=2026-04-10T19:53:35.973+02:00 level=INFO msg="shutting down server" service=server
time=2026-04-10T19:53:35.973+02:00 level=INFO msg="server done" service=server
time=2026-04-10T19:53:35.974+02:00 level=ERROR msg="exited with error" err="stack run had errors"
The state gets refreshed, but pulumi will still error.
Previous lines show:
time=2026-04-10T19:53:31.499+02:00 level=INFO msg="rpc request" method=POST url=/rpc
time=2026-04-10T19:53:33.860+02:00 level=INFO msg="rpc request" method=POST url=/rpc
time=2026-04-10T19:53:33.863+02:00 level=INFO msg="rpc request" method=POST url=/rpc
time=2026-04-10T19:53:34.022+02:00 level=INFO msg="INFO pushing partial state updateID=[redacted]"
time=2026-04-10T19:53:34.606+02:00 level=INFO msg="pulumi exited" service=project.run updateID=[redacted] err="exit status 255"
SST Version: 4.5.0
Minimal example code to repro:
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "aws-bun-test",
removal: input?.stage === "production" ? "retain" : "remove",
protect: ["production"].includes(input?.stage),
home: "aws",
providers: {
aws: "7.23.0",
},
};
},
async run() {
const router = new sst.aws.Router("Router");
const api = new sst.aws.ApiGatewayV2("Api");
// Remove this, then run refresh -> deploy, it will run just fine
// But after adding this, and refreshing, pulumi will exit with 255 and sst with code 1
api.route("GET /a", "functions/a.handler");
return {
router: router.url,
api: api.url,
};
},
});
Repro:
sst refresh --verbose --print-logsPulumi will exit with error code 255 and with the following log:
✓ RefreshedRouter: https://***.cloudfront.netApi: https://***.execute-api.eu-west-1.amazonaws.com---api: https://***.execute-api.eu-west-1.amazonaws.comrouter: https://***.cloudfront.nettime=2026-04-10T19:53:35.758+02:00 level=INFO msg="INFO unlocking app=aws-bun-test stage=fabryscript"time=2026-04-10T19:53:35.973+02:00 level=INFO msg="shutting down server" service=servertime=2026-04-10T19:53:35.973+02:00 level=INFO msg="server done" service=servertime=2026-04-10T19:53:35.974+02:00 level=ERROR msg="exited with error" err="stack run had errors"The state gets refreshed, but pulumi will still error.
Previous lines show:
time=2026-04-10T19:53:31.499+02:00 level=INFO msg="rpc request" method=POST url=/rpctime=2026-04-10T19:53:33.860+02:00 level=INFO msg="rpc request" method=POST url=/rpctime=2026-04-10T19:53:33.863+02:00 level=INFO msg="rpc request" method=POST url=/rpctime=2026-04-10T19:53:34.022+02:00 level=INFO msg="INFO pushing partial state updateID=[redacted]"time=2026-04-10T19:53:34.606+02:00 level=INFO msg="pulumi exited" service=project.run updateID=[redacted] err="exit status 255"SST Version: 4.5.0
Minimal example code to repro: