Repository navigation
v4.21.2
·
122 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Faster deploys for apps that pass an IAM role to their functions, and Router timeout docs that match what CloudFront does. Still built on upstream v4.17.2.
Fixes
- A function no longer reads the IAM role you pass to it on every deploy. With
roleset, SST looked the role up once per function on everysst devandsst deploy, even when nothing had changed, so an app that shares one role across many functions paid for it many times. On a test app with 150 functions sharing one role, that was 150 reads per run, and it is now 0; a deploy with nothing to change went from 21–26 seconds to 13–18 seconds. The role is read when you accessnodes.role, and then a role that doesn't exist fails the deploy. Because of that, a role that was deleted no longer fails a deploy of an existing function: the function fails when it runs, with "The role defined for the function cannot be assumed by Lambda". Theroledocs now say so. The first deploy after you update changes none of your resources; it only drops the role reads from SST's state. (#116, anomalyco/sst#6942)
Docs
- The
readTimeoutandkeepAliveTimeoutoptions of a URL route on aRouter(router.route()) now say what CloudFront does.readTimeoutcounts for each connection attempt, so a request to a destination that never answers can takereadTimeouttimesconnectionAttempts(3 by default) to fail.keepAliveTimeoutis passed to CloudFront but ignored: the connection is kept for the keep-alive timeout of the distribution's origin, 5 seconds by default. (#112, anomalyco/sst#6987, anomalyco/sst#6900)
Install
npm install sst@npm:@sst-community/sst@4.21.2To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.21.2"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bash